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

Side by Side Diff: chrome/browser/ui/webui/options/geolocation_options_handler.cc

Issue 21985002: Add Finch Checks to the State Machine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SMLog
Patch Set: Remove enableExperiment 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/google_now/manifest.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/webui/options/geolocation_options_handler.h" 5 #include "chrome/browser/ui/webui/options/geolocation_options_handler.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "content/public/browser/web_ui.h" 10 #include "content/public/browser/web_ui.h"
11 11
12 namespace options { 12 namespace options {
13 13
14 GeolocationOptionsHandler::GeolocationOptionsHandler() {} 14 GeolocationOptionsHandler::GeolocationOptionsHandler() {}
15 15
16 GeolocationOptionsHandler::~GeolocationOptionsHandler() {} 16 GeolocationOptionsHandler::~GeolocationOptionsHandler() {}
17 17
18 void GeolocationOptionsHandler::GetLocalizedValues( 18 void GeolocationOptionsHandler::GetLocalizedValues(
19 DictionaryValue* localized_strings) { 19 DictionaryValue* localized_strings) {
20 } 20 }
21 21
22 void GeolocationOptionsHandler::InitializePage() { 22 void GeolocationOptionsHandler::InitializePage() {
23 DCHECK(web_ui()); 23 DCHECK(web_ui());
24 24
25 if ((base::FieldTrialList::FindFullName("GoogleNow") == "Enable") || 25 std::string enablePrefix("Enable");
xiyuan 2013/08/09 23:31:53 enablePrefix -> enable_prefix
robliao 2013/08/12 17:18:22 Done.
26 std::string fieldTrialResult =
xiyuan 2013/08/09 23:31:53 fieldTrialResult -> field_trial_result
robliao 2013/08/12 17:18:22 Done.
27 base::FieldTrialList::FindFullName("GoogleNow");
28 if ((fieldTrialResult.compare(0, enablePrefix.length(), enablePrefix) == 0) ||
26 CommandLine::ForCurrentProcess()->HasSwitch( 29 CommandLine::ForCurrentProcess()->HasSwitch(
27 switches::kEnableGoogleNowIntegration)) { 30 switches::kEnableGoogleNowIntegration)) {
28 web_ui()->CallJavascriptFunction( 31 web_ui()->CallJavascriptFunction(
29 "GeolocationOptions.showGeolocationOption"); 32 "GeolocationOptions.showGeolocationOption");
30 } 33 }
31 } 34 }
32 35
33 } // namespace options 36 } // namespace options
34 37
OLDNEW
« no previous file with comments | « chrome/browser/resources/google_now/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698