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

Unified Diff: chrome/browser/ui/webui/options/geolocation_options_handler.cc

Issue 15716012: Add a Preference for Google Services to Use the User's Location (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 6 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
Index: chrome/browser/ui/webui/options/geolocation_options_handler.cc
===================================================================
--- chrome/browser/ui/webui/options/geolocation_options_handler.cc (revision 0)
+++ chrome/browser/ui/webui/options/geolocation_options_handler.cc (working copy)
@@ -0,0 +1,36 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/webui/options/geolocation_options_handler.h"
+
+#include "base/command_line.h"
+#include "base/metrics/field_trial.h"
+#include "chrome/common/chrome_switches.h"
+#include "content/public/browser/web_ui.h"
+
+namespace options {
+
+GeolocationOptionsHandler::GeolocationOptionsHandler() {
+}
+
+GeolocationOptionsHandler::~GeolocationOptionsHandler() {
+}
+
+void GeolocationOptionsHandler::GetLocalizedValues(
+ DictionaryValue* localized_strings) {
+}
+
+void GeolocationOptionsHandler::InitializePage() {
+ DCHECK(web_ui());
+
+ if ((base::FieldTrialList::FindFullName("GoogleNow") == "Enable") ||
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableGoogleNowIntegration)) {
+ web_ui()->CallJavascriptFunction(
+ "GeolocationOptions.showGeolocationOption");
+ }
+}
+
+} // namespace options
+

Powered by Google App Engine
This is Rietveld 408576698