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 3 // found in the LICENSE file. 4 5 #include "chrome/browser/ui/webui/options/geolocation_options_handler.h" 6 7 #include "base/command_line.h" 8 #include "base/metrics/field_trial.h" 9 #include "chrome/common/chrome_switches.h" 10 #include "content/public/browser/web_ui.h" 11 12 namespace options { 13 14 GeolocationOptionsHandler::GeolocationOptionsHandler() {} 15 16 GeolocationOptionsHandler::~GeolocationOptionsHandler() {} 17 18 void GeolocationOptionsHandler::GetLocalizedValues( 19 DictionaryValue* localized_strings) { 20 } 21 22 void GeolocationOptionsHandler::InitializePage() { 23 DCHECK(web_ui()); 24 25 if ((base::FieldTrialList::FindFullName("GoogleNow") == "Enable") || 26 CommandLine::ForCurrentProcess()->HasSwitch( 27 switches::kEnableGoogleNowIntegration)) { 28 web_ui()->CallJavascriptFunction( 29 "GeolocationOptions.showGeolocationOption"); 30 } 31 } 32 33 } // namespace options 34 35