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

Unified Diff: chrome/browser/extensions/component_loader.cc

Issue 21985002: Add Finch Checks to the State Machine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SMLog
Patch Set: Make Strings Const Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/google_now/background.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/component_loader.cc
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc
index 36d6be519f7e746d10a5a133e7d1ed01bb85df33..1428a34ec2e7b408a43132fa7ee8fa13e48b8bcb 100644
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -470,7 +470,15 @@ void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages(
#endif // defined(OS_CHROMEOS)
#if defined(ENABLE_GOOGLE_NOW)
- if (base::FieldTrialList::FindFullName("GoogleNow") == "Enable" ||
+ const char kEnablePrefix[] = "Enable";
+ const char kFieldTrialName[] = "GoogleNow";
+ std::string enable_prefix(kEnablePrefix);
+ std::string field_trial_result =
+ base::FieldTrialList::FindFullName(kFieldTrialName);
+ if ((field_trial_result.compare(
+ 0,
+ enable_prefix.length(),
+ enable_prefix) == 0) ||
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableGoogleNowIntegration)) {
Add(IDR_GOOGLE_NOW_MANIFEST,
« no previous file with comments | « no previous file | chrome/browser/resources/google_now/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698