M42 snap browser

Change-Id: If52741ad5e34241aa9f928244942a33a91610e58
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index c7b8ea7..0a23205 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -219,7 +219,7 @@
         PageState(Context c, boolean incognito) {
             mIncognito = incognito;
             if (mIncognito) {
-                mOriginalUrl = mUrl = "browser:incognito";
+                mOriginalUrl = mUrl = "chrome://incognito";
                 mTitle = c.getString(R.string.new_incognito_tab);
             } else {
                 mOriginalUrl = mUrl = "";
@@ -670,7 +670,7 @@
         public WebResourceResponse shouldInterceptRequest(WebView view,
                 String url) {
             //intercept if opening a new incognito tab - show the incognito welcome page
-            if (url.startsWith("browser:incognito")) {
+            if (url.startsWith("chrome://incognito")) {
                 Resources resourceHandle = mContext.getResources();
                 InputStream inStream = resourceHandle.openRawResource(
                         com.android.browser.R.raw.incognito_mode_start_page);
@@ -702,6 +702,24 @@
                 super.onUnhandledKeyEvent(view, event);
             }
         }
+        //SWE-download-file
+        @Override
+        public void onDownloadStart(String url,
+                                 String userAgent,
+                                 String contentDisposition,
+                                 String mimeType,
+                                 long contentLength) {
+          if (mDownloadListener != null) {
+             if (mDownloadListener instanceof BrowserDownloadListener) {
+                 ((BrowserDownloadListener) mDownloadListener).onDownloadStart(url,
+                     userAgent, contentDisposition, mimeType, contentLength);
+             } else {
+                 mDownloadListener.onDownloadStart(url, userAgent,
+                     contentDisposition, mimeType, contentLength);
+             }
+          }
+        }
+        //SWE-download-file
     };
 
     private void syncCurrentState(WebView view, String url) {
@@ -1578,7 +1596,7 @@
             if (mMainView.hasCrashed()) {
                 // Reload if render process has crashed. This is done here so that
                 // setFocus call sends wasShown message to correct render process.
-                mMainView.reload();
+                mMainView.setNeedsReload(true);
             }
             setupHwAcceleration(mMainView);
             mMainView.onResume();