Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java

Issue 2318493003: Clean up PathUtils unused parameters. (Closed)
Patch Set: Fix more. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package com.android.webview.chromium; 5 package com.android.webview.chromium;
6 6
7 import android.Manifest; 7 import android.Manifest;
8 import android.app.ActivityManager; 8 import android.app.ActivityManager;
9 import android.content.ComponentCallbacks2; 9 import android.content.ComponentCallbacks2;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 System.loadLibrary("webviewchromium_plat_support"); 232 System.loadLibrary("webviewchromium_plat_support");
233 233
234 // Use shared preference to check for package downgrade. 234 // Use shared preference to check for package downgrade.
235 mWebViewPrefs = ContextUtils.getApplicationContext().getSharedPreference s( 235 mWebViewPrefs = ContextUtils.getApplicationContext().getSharedPreference s(
236 CHROMIUM_PREFS_NAME, Context.MODE_PRIVATE); 236 CHROMIUM_PREFS_NAME, Context.MODE_PRIVATE);
237 int lastVersion = mWebViewPrefs.getInt(VERSION_CODE_PREF, 0); 237 int lastVersion = mWebViewPrefs.getInt(VERSION_CODE_PREF, 0);
238 int currentVersion = packageInfo.versionCode; 238 int currentVersion = packageInfo.versionCode;
239 if (!versionCodeGE(currentVersion, lastVersion)) { 239 if (!versionCodeGE(currentVersion, lastVersion)) {
240 // The WebView package has been downgraded since we last ran in this application. 240 // The WebView package has been downgraded since we last ran in this application.
241 // Delete the WebView data directory's contents. 241 // Delete the WebView data directory's contents.
242 String dataDir = PathUtils.getDataDirectory(ContextUtils.getApplicat ionContext()); 242 String dataDir = PathUtils.getDataDirectory();
243 Log.i(TAG, "WebView package downgraded from " + lastVersion + " to " + currentVersion 243 Log.i(TAG, "WebView package downgraded from " + lastVersion + " to " + currentVersion
244 + "; deleting contents of " + dataDir); 244 + "; deleting contents of " + dataDir);
245 deleteContents(new File(dataDir)); 245 deleteContents(new File(dataDir));
246 } 246 }
247 if (lastVersion != currentVersion) { 247 if (lastVersion != currentVersion) {
248 mWebViewPrefs.edit().putInt(VERSION_CODE_PREF, currentVersion).apply (); 248 mWebViewPrefs.edit().putInt(VERSION_CODE_PREF, currentVersion).apply ();
249 } 249 }
250 250
251 mShouldDisableThreadChecking = 251 mShouldDisableThreadChecking =
252 shouldDisableThreadChecking(ContextUtils.getApplicationContext() ); 252 shouldDisableThreadChecking(ContextUtils.getApplicationContext() );
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 mWebViewDatabase = new WebViewDatabaseAdapter(this, awDatabase); 646 mWebViewDatabase = new WebViewDatabaseAdapter(this, awDatabase);
647 } 647 }
648 } 648 }
649 return mWebViewDatabase; 649 return mWebViewDatabase;
650 } 650 }
651 651
652 WebViewDelegate getWebViewDelegate() { 652 WebViewDelegate getWebViewDelegate() {
653 return mWebViewDelegate; 653 return mWebViewDelegate;
654 } 654 }
655 } 655 }
OLDNEW
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698