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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java

Issue 2548013002: Remove redundant field initialization in Java code. (Closed)
Patch Set: rebase Created 4 years 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 org.chromium.chrome.browser.partnercustomizations; 5 package org.chromium.chrome.browser.partnercustomizations;
6 6
7 import android.content.ContentResolver; 7 import android.content.ContentResolver;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.pm.ApplicationInfo; 9 import android.content.pm.ApplicationInfo;
10 import android.content.pm.ProviderInfo; 10 import android.content.pm.ProviderInfo;
(...skipping 19 matching lines...) Expand all
30 private static final String TAG = "PartnerBrowserProvider"; 30 private static final String TAG = "PartnerBrowserProvider";
31 private static final String PROVIDER_AUTHORITY = "com.android.partnerbrowser customizations"; 31 private static final String PROVIDER_AUTHORITY = "com.android.partnerbrowser customizations";
32 32
33 // Private homepage structure. 33 // Private homepage structure.
34 static final String PARTNER_HOMEPAGE_PATH = "homepage"; 34 static final String PARTNER_HOMEPAGE_PATH = "homepage";
35 static final String PARTNER_DISABLE_BOOKMARKS_EDITING_PATH = "disablebookmar ksediting"; 35 static final String PARTNER_DISABLE_BOOKMARKS_EDITING_PATH = "disablebookmar ksediting";
36 @VisibleForTesting 36 @VisibleForTesting
37 public static final String PARTNER_DISABLE_INCOGNITO_MODE_PATH = "disableinc ognitomode"; 37 public static final String PARTNER_DISABLE_INCOGNITO_MODE_PATH = "disableinc ognitomode";
38 38
39 private static String sProviderAuthority = PROVIDER_AUTHORITY; 39 private static String sProviderAuthority = PROVIDER_AUTHORITY;
40 private static boolean sIgnoreBrowserProviderSystemPackageCheck = false; 40 private static boolean sIgnoreBrowserProviderSystemPackageCheck;
41 private static volatile String sHomepage; 41 private static volatile String sHomepage;
42 private static volatile boolean sIncognitoModeDisabled; 42 private static volatile boolean sIncognitoModeDisabled;
43 private static volatile boolean sBookmarksEditingDisabled; 43 private static volatile boolean sBookmarksEditingDisabled;
44 private static boolean sIsInitialized; 44 private static boolean sIsInitialized;
45 private static List<Runnable> sInitializeAsyncCallbacks = new ArrayList<Runn able>(); 45 private static List<Runnable> sInitializeAsyncCallbacks = new ArrayList<Runn able>();
46 46
47 /** 47 /**
48 * @return True if the partner homepage content provider exists and enabled. Note that The data 48 * @return True if the partner homepage content provider exists and enabled. Note that The data
49 * this method reads is not initialized until the asynchronous initi alization of this 49 * this method reads is not initialized until the asynchronous initi alization of this
50 * class has been completed. 50 * class has been completed.
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 * provider or provider set it to null to disable homepage. 286 * provider or provider set it to null to disable homepage.
287 */ 287 */
288 public static String getHomePageUrl() { 288 public static String getHomePageUrl() {
289 CommandLine commandLine = CommandLine.getInstance(); 289 CommandLine commandLine = CommandLine.getInstance();
290 if (commandLine.hasSwitch(ChromeSwitches.PARTNER_HOMEPAGE_FOR_TESTING)) { 290 if (commandLine.hasSwitch(ChromeSwitches.PARTNER_HOMEPAGE_FOR_TESTING)) {
291 return commandLine.getSwitchValue(ChromeSwitches.PARTNER_HOMEPAGE_FO R_TESTING); 291 return commandLine.getSwitchValue(ChromeSwitches.PARTNER_HOMEPAGE_FO R_TESTING);
292 } 292 }
293 return sHomepage; 293 return sHomepage;
294 } 294 }
295 } 295 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698