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

Unified Diff: chrome/browser/resources/options/geolocation_options.js

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/resources/options/geolocation_options.js
===================================================================
--- chrome/browser/resources/options/geolocation_options.js (revision 0)
+++ chrome/browser/resources/options/geolocation_options.js (working copy)
@@ -0,0 +1,35 @@
+// 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.
+
+cr.define('options', function() {
+ var OptionsPage = options.OptionsPage;
+
+ /**
+ * GeolocationOptions class
vadimt 2013/06/07 00:56:07 It would help to end sentences with '.'.
robliao 2013/06/07 07:34:36 Done.
+ * Shows the component geolocation option when Google Now is enabled
vadimt 2013/06/07 00:56:07 'when Google Now is enabled' belongs to the logic
robliao 2013/06/07 07:34:36 Done.
+ * @constructor
+ * @class
+ */
+ function GeolocationOptions() {
+ OptionsPage.call(this,
vadimt 2013/06/07 00:56:07 Curious: what does this call do?
robliao 2013/06/07 07:34:36 This initializes the our "parent class". The other
robliao 2013/06/07 07:34:36 Done.
vadimt 2013/06/07 17:16:28 No need to additionally add "done" comments when y
+ 'geolocationOptions',
+ loadTimeData.getString('geolocationOptionsPageTabTitle'),
+ 'geolocation-options');
+ };
+
+ cr.addSingletonGetter(GeolocationOptions);
+
+ GeolocationOptions.prototype = {
+ __proto__: OptionsPage.prototype
+ };
+
+ GeolocationOptions.showGeolocationOption = function() {
+ var geolocationCheckboxContainer = $('geolocationCheckbox');
+ if (geolocationCheckboxContainer) {
vadimt 2013/06/07 00:56:07 No need in curlies.
robliao 2013/06/07 07:34:36 The Google JS style guide is written with curlies
robliao 2013/06/07 07:34:36 Done.
vadimt 2013/06/07 17:16:28 I'm OK with this; however reviewers used to requir
+ geolocationCheckboxContainer.hidden = false;
+ }
+ };
+
+ return { GeolocationOptions: GeolocationOptions };
vadimt 2013/06/07 00:56:07 return {GeolocationOptions: GeolocationOptions};
robliao 2013/06/07 07:34:36 I went ahead and matched the style in the other fi
robliao 2013/06/07 07:34:36 Done.
vadimt 2013/06/07 17:16:28 Your choice, but if it fits in 1 line, you could a
+});

Powered by Google App Engine
This is Rietveld 408576698