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

Issue 18341016: Add types.private.ChromeDirectSetting and Connect it to preferencesPrivate.googleGeolocationAccessE… (Closed)

Created:
7 years, 5 months ago by robliao
Modified:
7 years, 5 months ago
CC:
vadimt, asargent_no_longer_on_chrome, battre, chromium-reviews, chromium-apps-reviews_chromium.org, Ilya Sherman, jar (doing other things), asvitkine+watch_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add types.private.ChromeDirectSetting and Connect it to preferencesPrivate.googleGeolocationAccessEnabled * Adds a component extension only API type chrome.types.private.ChromeDirectSetting (mirrors ChromeSetting except that it does not provide levelOfControl info given that this only applies to component extensions). * Switches preferencesPrivate.googleGeolocationAccessEnabled to use chrome.types.private.ChromeDirectSetting * Implements preliminary get, set, and clear functionality (direct access to the preferences) * Adds stubs for onChange to be done later. * Removes existing component extension affordances in the existing extension preferences codepath BUG=164227 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=211300

Patch Set 1 #

Total comments: 1

Patch Set 2 : Sync to Latest #

Total comments: 14

Patch Set 3 : CR Feedback #

Patch Set 4 : CR Feedback #

Total comments: 2

Patch Set 5 : #

Patch Set 6 : Added Preference Whitelist #

Total comments: 4

Patch Set 7 : Added Lazy Initialized Whitelist #

Total comments: 6

Patch Set 8 : CR Feedback #

Patch Set 9 : #

Total comments: 39

Patch Set 10 : CR Feedback #

Patch Set 11 : Update types_private.json to Use the Strings from types.json #

Patch Set 12 : Remove Inline Constructors and Destructors #

Patch Set 13 : Sync to Latest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+434 lines, -13 lines) Patch
A chrome/browser/extensions/api/preference/chrome_direct_setting.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +87 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/preference/chrome_direct_setting.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +128 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/preference/preference_api.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/preference/preference_helpers.cc View 2 chunks +1 line, -5 lines 0 comments Download
M chrome/browser/extensions/extension_function_histogram_value.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_function_registry.cc View 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/api/_api_features.json View 1 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/extension_api.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/api/preferences_private.json View 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/common/extensions/api/types_private.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +143 lines, -0 lines 0 comments Download
M chrome/common/extensions_api_resources.grd View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/extensions/dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/renderer/resources/extensions/chrome_direct_setting.js View 1 1 chunk +45 lines, -0 lines 0 comments Download
M chrome/renderer/resources/renderer_resources.grd View 1 chunk +2 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
robliao
Publishing new review to update to latest and add a few lines of code. https://codereview.chromium.org/18341016/diff/1/chrome/common/extensions/api/types_private.json ...
7 years, 5 months ago (2013-07-04 00:12:01 UTC) #1
vadimt
I've briefly looked at this :) Please proceed with the file owners.
7 years, 5 months ago (2013-07-09 00:33:05 UTC) #2
robliao
asargent: chrome/browser/extensions/api/preference/chrome_direct_setting.h chrome/browser/extensions/api/preference/chrome_direct_setting.cc chrome/browser/extensions/api/preference/preference_api.cc chrome/browser/extensions/api/preference/preference_helpers.cc chrome/browser/extensions/extension_function_histogram_value.h chrome/browser/extensions/extension_function_registry.cc chrome/common/extensions/api/_api_features.json chrome/common/extensions/api/extension_api.cc chrome/common/extensions/api/preferences_private.json chrome/common/extensions/api/types_private.json chrome/common/extensions_api_resources.grd chrome/renderer/extensions/dispatcher.cc chrome/renderer/resources/extensions/chrome_direct_setting.js sky: ...
7 years, 5 months ago (2013-07-09 00:42:24 UTC) #3
robliao
On 2013/07/09 00:42:24, Robert Liao wrote: > asargent: > chrome/browser/extensions/api/preference/chrome_direct_setting.h > chrome/browser/extensions/api/preference/chrome_direct_setting.cc > chrome/browser/extensions/api/preference/preference_api.cc > ...
7 years, 5 months ago (2013-07-09 00:42:54 UTC) #4
robliao
Syncing to the latest...
7 years, 5 months ago (2013-07-09 02:20:20 UTC) #5
Bernhard Bauer
https://codereview.chromium.org/18341016/diff/7001/chrome/browser/extensions/api/preference/chrome_direct_setting.cc File chrome/browser/extensions/api/preference/chrome_direct_setting.cc (right): https://codereview.chromium.org/18341016/diff/7001/chrome/browser/extensions/api/preference/chrome_direct_setting.cc#newcode20 chrome/browser/extensions/api/preference/chrome_direct_setting.cc:20: // this means the API permissions system has failed. ...
7 years, 5 months ago (2013-07-09 07:34:31 UTC) #6
Mark P
histograms.xml lgtm
7 years, 5 months ago (2013-07-09 13:25:11 UTC) #7
sky
LGTM
7 years, 5 months ago (2013-07-09 16:26:11 UTC) #8
robliao
https://codereview.chromium.org/18341016/diff/7001/chrome/browser/extensions/api/preference/chrome_direct_setting.cc File chrome/browser/extensions/api/preference/chrome_direct_setting.cc (right): https://codereview.chromium.org/18341016/diff/7001/chrome/browser/extensions/api/preference/chrome_direct_setting.cc#newcode20 chrome/browser/extensions/api/preference/chrome_direct_setting.cc:20: // this means the API permissions system has failed. ...
7 years, 5 months ago (2013-07-09 17:27:45 UTC) #9
Bernhard Bauer
https://codereview.chromium.org/18341016/diff/7001/chrome/browser/extensions/api/preference/chrome_direct_setting.cc File chrome/browser/extensions/api/preference/chrome_direct_setting.cc (right): https://codereview.chromium.org/18341016/diff/7001/chrome/browser/extensions/api/preference/chrome_direct_setting.cc#newcode36 chrome/browser/extensions/api/preference/chrome_direct_setting.cc:36: GetPrefService()->FindPreference(pref_key.c_str()); I'm also worried about directly using the passed ...
7 years, 5 months ago (2013-07-09 17:58:27 UTC) #10
robliao
https://codereview.chromium.org/18341016/diff/7001/chrome/browser/extensions/api/preference/chrome_direct_setting.cc File chrome/browser/extensions/api/preference/chrome_direct_setting.cc (right): https://codereview.chromium.org/18341016/diff/7001/chrome/browser/extensions/api/preference/chrome_direct_setting.cc#newcode36 chrome/browser/extensions/api/preference/chrome_direct_setting.cc:36: GetPrefService()->FindPreference(pref_key.c_str()); Isn't the JSON API declaration sufficient for limiting ...
7 years, 5 months ago (2013-07-09 18:15:53 UTC) #11
Bernhard Bauer
https://codereview.chromium.org/18341016/diff/7001/chrome/browser/extensions/api/preference/chrome_direct_setting.cc File chrome/browser/extensions/api/preference/chrome_direct_setting.cc (right): https://codereview.chromium.org/18341016/diff/7001/chrome/browser/extensions/api/preference/chrome_direct_setting.cc#newcode36 chrome/browser/extensions/api/preference/chrome_direct_setting.cc:36: GetPrefService()->FindPreference(pref_key.c_str()); On 2013/07/09 18:15:53, Robert Liao wrote: > Isn't ...
7 years, 5 months ago (2013-07-09 18:45:41 UTC) #12
robliao
https://codereview.chromium.org/18341016/diff/7001/chrome/browser/extensions/api/preference/chrome_direct_setting.cc File chrome/browser/extensions/api/preference/chrome_direct_setting.cc (right): https://codereview.chromium.org/18341016/diff/7001/chrome/browser/extensions/api/preference/chrome_direct_setting.cc#newcode36 chrome/browser/extensions/api/preference/chrome_direct_setting.cc:36: GetPrefService()->FindPreference(pref_key.c_str()); I'm going to think about the best way ...
7 years, 5 months ago (2013-07-09 18:53:37 UTC) #13
robliao
I ended up landing on a whitelist * We can't run Javascript in the browser ...
7 years, 5 months ago (2013-07-09 22:11:32 UTC) #14
Bernhard Bauer
https://codereview.chromium.org/18341016/diff/34018/chrome/browser/extensions/api/preference/chrome_direct_setting.cc File chrome/browser/extensions/api/preference/chrome_direct_setting.cc (right): https://codereview.chromium.org/18341016/diff/34018/chrome/browser/extensions/api/preference/chrome_direct_setting.cc#newcode20 chrome/browser/extensions/api/preference/chrome_direct_setting.cc:20: const std::string &pref_key) { Nit: the ampersand comes after ...
7 years, 5 months ago (2013-07-09 22:27:22 UTC) #15
robliao
https://codereview.chromium.org/18341016/diff/34018/chrome/browser/extensions/api/preference/chrome_direct_setting.cc File chrome/browser/extensions/api/preference/chrome_direct_setting.cc (right): https://codereview.chromium.org/18341016/diff/34018/chrome/browser/extensions/api/preference/chrome_direct_setting.cc#newcode20 chrome/browser/extensions/api/preference/chrome_direct_setting.cc:20: const std::string &pref_key) { On 2013/07/09 22:27:22, Bernhard Bauer ...
7 years, 5 months ago (2013-07-09 23:07:22 UTC) #16
Bernhard Bauer
https://codereview.chromium.org/18341016/diff/26002/chrome/browser/extensions/api/preference/chrome_direct_setting.h File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): https://codereview.chromium.org/18341016/diff/26002/chrome/browser/extensions/api/preference/chrome_direct_setting.h#newcode32 chrome/browser/extensions/api/preference/chrome_direct_setting.h:32: class PreferenceWhitelist { You can move this class (and ...
7 years, 5 months ago (2013-07-09 23:23:43 UTC) #17
robliao
https://codereview.chromium.org/18341016/diff/26002/chrome/browser/extensions/api/preference/chrome_direct_setting.h File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): https://codereview.chromium.org/18341016/diff/26002/chrome/browser/extensions/api/preference/chrome_direct_setting.h#newcode32 chrome/browser/extensions/api/preference/chrome_direct_setting.h:32: class PreferenceWhitelist { I'll move the class, but keep ...
7 years, 5 months ago (2013-07-09 23:37:41 UTC) #18
Bernhard Bauer
https://codereview.chromium.org/18341016/diff/26002/chrome/browser/extensions/api/preference/chrome_direct_setting.h File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): https://codereview.chromium.org/18341016/diff/26002/chrome/browser/extensions/api/preference/chrome_direct_setting.h#newcode32 chrome/browser/extensions/api/preference/chrome_direct_setting.h:32: class PreferenceWhitelist { On 2013/07/09 23:37:41, Robert Liao wrote: ...
7 years, 5 months ago (2013-07-10 10:52:24 UTC) #19
robliao
https://codereview.chromium.org/18341016/diff/26002/chrome/browser/extensions/api/preference/chrome_direct_setting.h File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): https://codereview.chromium.org/18341016/diff/26002/chrome/browser/extensions/api/preference/chrome_direct_setting.h#newcode32 chrome/browser/extensions/api/preference/chrome_direct_setting.h:32: class PreferenceWhitelist { Where can I provide feedback on ...
7 years, 5 months ago (2013-07-10 16:52:39 UTC) #20
Bernhard Bauer
LGTM! On 2013/07/10 16:52:39, Robert Liao wrote: > https://codereview.chromium.org/18341016/diff/26002/chrome/browser/extensions/api/preference/chrome_direct_setting.h > File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): > > ...
7 years, 5 months ago (2013-07-10 16:59:37 UTC) #21
robliao
On 2013/07/10 16:59:37, Bernhard Bauer wrote: > LGTM! > > On 2013/07/10 16:52:39, Robert Liao ...
7 years, 5 months ago (2013-07-10 17:02:03 UTC) #22
robliao
asargent became OOO. miket: Can you provide owner approval for these files? Thanks! chrome/browser/extensions/api/preference/chrome_direct_setting.h chrome/browser/extensions/api/preference/chrome_direct_setting.cc ...
7 years, 5 months ago (2013-07-10 17:13:18 UTC) #23
miket_OOO
https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h#newcode19 chrome/browser/extensions/api/preference/chrome_direct_setting.h:19: DirectSettingFunctionBase() {} No inline constructors/destructors in non-virtual classes. http://www.chromium.org/developers/coding-style/cpp-dos-and-donts ...
7 years, 5 months ago (2013-07-10 18:34:47 UTC) #24
robliao
https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h#newcode19 chrome/browser/extensions/api/preference/chrome_direct_setting.h:19: DirectSettingFunctionBase() {} I think the intent behind this rule ...
7 years, 5 months ago (2013-07-10 20:20:09 UTC) #25
robliao
https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h#newcode19 chrome/browser/extensions/api/preference/chrome_direct_setting.h:19: DirectSettingFunctionBase() {} Furthermore, these classes shouldn't store state due ...
7 years, 5 months ago (2013-07-10 20:33:32 UTC) #26
robliao
https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h#newcode19 chrome/browser/extensions/api/preference/chrome_direct_setting.h:19: DirectSettingFunctionBase() {} Furthermore, these classes shouldn't store state due ...
7 years, 5 months ago (2013-07-10 20:33:32 UTC) #27
miket_OOO
lgtm https://codereview.chromium.org/18341016/diff/61003/chrome/common/extensions/api/types_private.json File chrome/common/extensions/api/types_private.json (right): https://codereview.chromium.org/18341016/diff/61003/chrome/common/extensions/api/types_private.json#newcode25 chrome/common/extensions/api/types_private.json:25: "description": "What setting to consider.", On 2013/07/10 20:20:09, ...
7 years, 5 months ago (2013-07-10 21:11:48 UTC) #28
Bernhard Bauer
https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h#newcode19 chrome/browser/extensions/api/preference/chrome_direct_setting.h:19: DirectSettingFunctionBase() {} On 2013/07/10 20:20:09, Robert Liao wrote: > ...
7 years, 5 months ago (2013-07-10 22:11:25 UTC) #29
robliao
https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h#newcode19 chrome/browser/extensions/api/preference/chrome_direct_setting.h:19: DirectSettingFunctionBase() {} What non-trivial code is present here? The ...
7 years, 5 months ago (2013-07-10 22:18:45 UTC) #30
Bernhard Bauer
https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h#newcode19 chrome/browser/extensions/api/preference/chrome_direct_setting.h:19: DirectSettingFunctionBase() {} On 2013/07/10 22:18:45, Robert Liao wrote: > ...
7 years, 5 months ago (2013-07-10 22:37:23 UTC) #31
robliao
https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h File chrome/browser/extensions/api/preference/chrome_direct_setting.h (right): https://codereview.chromium.org/18341016/diff/61003/chrome/browser/extensions/api/preference/chrome_direct_setting.h#newcode19 chrome/browser/extensions/api/preference/chrome_direct_setting.h:19: DirectSettingFunctionBase() {} I went ahead and removed the inline ...
7 years, 5 months ago (2013-07-11 00:28:13 UTC) #32
Bernhard Bauer
LGTM!
7 years, 5 months ago (2013-07-11 06:17:05 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/robliao@chromium.org/18341016/29003
7 years, 5 months ago (2013-07-11 21:39:42 UTC) #34
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 5 months ago (2013-07-11 21:51:30 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/robliao@chromium.org/18341016/29003
7 years, 5 months ago (2013-07-12 00:35:15 UTC) #36
commit-bot: I haz the power
7 years, 5 months ago (2013-07-12 03:09:46 UTC) #37
Message was sent while issue was closed.
Change committed as 211300

Powered by Google App Engine
This is Rietveld 408576698