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

Side by Side Diff: components/omnibox/omnibox_field_trial.cc

Issue 774933004: Prefix CommandLine usage with base namespace (Part 9: components) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « components/omnibox/keyword_provider_unittest.cc ('k') | components/os_crypt/os_crypt_mac.mm » ('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 #include "components/omnibox/omnibox_field_trial.h" 5 #include "components/omnibox/omnibox_field_trial.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 kHQPAllowMatchInSchemeRule) == "true"; 301 kHQPAllowMatchInSchemeRule) == "true";
302 } 302 }
303 303
304 bool OmniboxFieldTrial::DisableInlining() { 304 bool OmniboxFieldTrial::DisableInlining() {
305 return variations::GetVariationParamValue( 305 return variations::GetVariationParamValue(
306 kBundledExperimentFieldTrialName, 306 kBundledExperimentFieldTrialName,
307 kDisableInliningRule) == "true"; 307 kDisableInliningRule) == "true";
308 } 308 }
309 309
310 bool OmniboxFieldTrial::EnableAnswersInSuggest() { 310 bool OmniboxFieldTrial::EnableAnswersInSuggest() {
311 const CommandLine* cl = CommandLine::ForCurrentProcess(); 311 const base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
312 if (cl->HasSwitch(switches::kDisableAnswersInSuggest)) 312 if (cl->HasSwitch(switches::kDisableAnswersInSuggest))
313 return false; 313 return false;
314 if (cl->HasSwitch(switches::kEnableAnswersInSuggest)) 314 if (cl->HasSwitch(switches::kEnableAnswersInSuggest))
315 return true; 315 return true;
316 316
317 return variations::GetVariationParamValue( 317 return variations::GetVariationParamValue(
318 kBundledExperimentFieldTrialName, 318 kBundledExperimentFieldTrialName,
319 kAnswersInSuggestRule) == "true"; 319 kAnswersInSuggestRule) == "true";
320 } 320 }
321 321
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 if (it != params.end()) 454 if (it != params.end())
455 return it->second; 455 return it->second;
456 // Fall back to the global instant extended context. 456 // Fall back to the global instant extended context.
457 it = params.find(rule + ":" + page_classification_str + ":*"); 457 it = params.find(rule + ":" + page_classification_str + ":*");
458 if (it != params.end()) 458 if (it != params.end())
459 return it->second; 459 return it->second;
460 // Look up rule in the global context. 460 // Look up rule in the global context.
461 it = params.find(rule + ":*:*"); 461 it = params.find(rule + ":*:*");
462 return (it != params.end()) ? it->second : std::string(); 462 return (it != params.end()) ? it->second : std::string();
463 } 463 }
OLDNEW
« no previous file with comments | « components/omnibox/keyword_provider_unittest.cc ('k') | components/os_crypt/os_crypt_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698