summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobliao@chromium.org <robliao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-22 01:45:06 +0000
committerrobliao@chromium.org <robliao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-22 01:45:06 +0000
commit6be0c2a3d8906f07f98a55212633c91c913b0d6f (patch)
tree530885ec0112041ac874cad90e90d929faff32bb
parentcf6cc2ee0f6a8267d5246f490421ac39b40f5b1c (diff)
downloadchromium_src-6be0c2a3d8906f07f98a55212633c91c913b0d6f.zip
chromium_src-6be0c2a3d8906f07f98a55212633c91c913b0d6f.tar.gz
chromium_src-6be0c2a3d8906f07f98a55212633c91c913b0d6f.tar.bz2
Enable Google Now By Default
BUG=164227 R=kalman@chromium.org, skare@chromium.org, vadimt@chromium.org Review URL: https://codereview.chromium.org/32473009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230002 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/about_flags.cc4
-rw-r--r--chrome/browser/extensions/component_loader.cc8
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
4 files changed, 12 insertions, 4 deletions
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 3415dde..7cf64a2 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1508,7 +1508,9 @@ const Experiment kExperiments[] = {
IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
kOsWin | kOsCrOS | kOsMac,
- SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
+ ENABLE_DISABLE_VALUE_TYPE(
+ switches::kEnableGoogleNowIntegration,
+ switches::kDisableGoogleNowIntegration)
},
#endif
#if defined(OS_CHROMEOS)
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc
index 1c358f8..1f802b5 100644
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -506,11 +506,13 @@ void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages(
std::string enable_prefix(kEnablePrefix);
std::string field_trial_result =
base::FieldTrialList::FindFullName(kFieldTrialName);
- if ((field_trial_result.compare(
+ if (((field_trial_result.compare(
0,
enable_prefix.length(),
- enable_prefix) == 0) ||
- CommandLine::ForCurrentProcess()->HasSwitch(
+ enable_prefix) == 0) &&
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableGoogleNowIntegration)) ||
+ CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableGoogleNowIntegration)) {
Add(IDR_GOOGLE_NOW_MANIFEST,
base::FilePath(FILE_PATH_LITERAL("google_now")));
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 741f7d7..050edbc 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -359,6 +359,9 @@ const char kDisableExtensionsHttpThrottling[] =
const char kDisableExtensionsResourceWhitelist[] =
"disable-extensions-resource-whitelist";
+// Disables Google Now integration.
+const char kDisableGoogleNowIntegration[] = "disable-google-now-integration";
+
// Disable Instant extended API.
const char kDisableInstantExtendedAPI[] = "disable-instant-extended-api";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index ab12125..3ec43b0a 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -109,6 +109,7 @@ extern const char kDisableExtensionsFileAccessCheck[];
extern const char kDisableExtensionsHttpThrottling[];
extern const char kDisableExtensionsResourceWhitelist[];
extern const char kDisableExtensions[];
+extern const char kDisableGoogleNowIntegration[];
extern const char kDisableImprovedDownloadProtection[];
extern const char kDisableInstantExtendedAPI[];
extern const char kDisableIPv6[];