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

Issue 7520023: Converted IncognitoForced boolean policy into IncognitoModeAvailability enum policy. (Closed)

Created:
9 years, 4 months ago by rustema
Modified:
9 years, 4 months ago
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, brettw-cc_chromium.org, Avi (use Gerrit), Paweł Hajdan Jr.
Visibility:
Public.

Description

Converted IncognitoForced boolean policy into IncognitoModeAvailability enum policy. Enum may take 3 values: * ENABLED (default) - both normal and incognito modes are allowed. * DISABLED - incognito mode cannot be used. * FORCED - browsing is only possible in incognito mode. Mapped IncognitoEnabled::false to IncognitoModeAvailability::DISABLED when IncognitoModeAvailability policy/pref is not set. Removed IncognitoEnabled pref (no longer used). BUG=69580 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=95580

Patch Set 1 #

Total comments: 24

Patch Set 2 : Converted incognito pref functions to a class. #

Total comments: 9

Patch Set 3 : Removed IncognitoEnabled pref. Fixed style issues. #

Total comments: 28

Patch Set 4 : Save IncognitoEnabled Value object instead of a boolean. Fix style issues. #

Patch Set 5 : Fixed compilation error. #

Patch Set 6 : Fix enum entry names & wrong include path. #

Total comments: 12

Patch Set 7 : Ignore incognito policies if values cannot be parsed. Address comments. #

Total comments: 2

Patch Set 8 : Removed unnecessary comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+491 lines, -68 lines) Patch
M chrome/app/policy/policy_templates.json View 1 1 chunk +29 lines, -8 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_context_menu_controller.cc View 1 2 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_tabs_apitest.cc View 1 2 3 5 6 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_tabs_module.cc View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/policy/config_dir_policy_provider_unittest.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/policy/configuration_policy_pref_store.cc View 1 2 3 4 5 6 7 10 chunks +72 lines, -5 lines 0 comments Download
M chrome/browser/policy/configuration_policy_pref_store_unittest.cc View 1 2 3 4 5 6 3 chunks +93 lines, -4 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_win_unittest.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/prefs/command_line_pref_store.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
A chrome/browser/prefs/incognito_mode_prefs.h View 1 2 3 4 5 6 1 chunk +53 lines, -0 lines 0 comments Download
A chrome/browser/prefs/incognito_mode_prefs.cc View 1 2 3 4 5 6 1 chunk +45 lines, -0 lines 0 comments Download
A chrome/browser/prefs/incognito_mode_prefs_unittest.cc View 1 2 3 4 5 6 1 chunk +66 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_value_map.h View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_value_map.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_value_map_unittest.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile.cc View 1 2 3 4 5 6 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 2 3 4 5 6 4 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 chunks +22 lines, -14 lines 0 comments Download
M chrome/browser/ui/browser_init.cc View 1 2 3 4 5 6 3 chunks +15 lines, -8 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm View 1 2 2 chunks +14 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_context_menu_controller_views.cc View 1 2 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Mattias Nissler (ping if slow)
http://codereview.chromium.org/7520023/diff/1/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): http://codereview.chromium.org/7520023/diff/1/chrome/app/policy/policy_templates.json#newcode270 chrome/app/policy/policy_templates.json:270: 'name': 'IncognitoEnabled', You should mark this policy as deprecated. ...
9 years, 4 months ago (2011-07-28 11:08:50 UTC) #1
Bernhard Bauer
http://codereview.chromium.org/7520023/diff/1/chrome/browser/policy/configuration_policy_pref_store.cc File chrome/browser/policy/configuration_policy_pref_store.cc (right): http://codereview.chromium.org/7520023/diff/1/chrome/browser/policy/configuration_policy_pref_store.cc#newcode651 chrome/browser/policy/configuration_policy_pref_store.cc:651: IncognitoModeAvailabilityPrefs::IntToIngocnitoModeAvailability( To be very thorough, you should also check ...
9 years, 4 months ago (2011-07-28 11:34:02 UTC) #2
rustema
http://codereview.chromium.org/7520023/diff/1/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): http://codereview.chromium.org/7520023/diff/1/chrome/app/policy/policy_templates.json#newcode270 chrome/app/policy/policy_templates.json:270: 'name': 'IncognitoEnabled', On 2011/07/28 11:08:50, Mattias Nissler wrote: > ...
9 years, 4 months ago (2011-07-29 06:49:23 UTC) #3
Bernhard Bauer
http://codereview.chromium.org/7520023/diff/5001/chrome/browser/prefs/incognito_mode_prefs.h File chrome/browser/prefs/incognito_mode_prefs.h (right): http://codereview.chromium.org/7520023/diff/5001/chrome/browser/prefs/incognito_mode_prefs.h#newcode44 chrome/browser/prefs/incognito_mode_prefs.h:44: IncognitoModePrefs(); DISALLOW_IMPLICIT_CONSTRUCTORS? And I think there is no need ...
9 years, 4 months ago (2011-07-29 09:11:46 UTC) #4
Mattias Nissler (ping if slow)
http://codereview.chromium.org/7520023/diff/5001/chrome/browser/policy/configuration_policy_pref_store.cc File chrome/browser/policy/configuration_policy_pref_store.cc (right): http://codereview.chromium.org/7520023/diff/5001/chrome/browser/policy/configuration_policy_pref_store.cc#newcode206 chrome/browser/policy/configuration_policy_pref_store.cc:206: prefs::kIncognitoEnabled }, This should go away. In fact, the ...
9 years, 4 months ago (2011-07-29 10:33:22 UTC) #5
Mattias Nissler (ping if slow)
Question for Pawel http://codereview.chromium.org/7520023/diff/5001/chrome/browser/prefs/incognito_mode_prefs_unittest.cc File chrome/browser/prefs/incognito_mode_prefs_unittest.cc (right): http://codereview.chromium.org/7520023/diff/5001/chrome/browser/prefs/incognito_mode_prefs_unittest.cc#newcode62 chrome/browser/prefs/incognito_mode_prefs_unittest.cc:62: EXPECT_DEBUG_DEATH({ Pawel, what's the current policy ...
9 years, 4 months ago (2011-07-29 11:29:08 UTC) #6
rustema
http://codereview.chromium.org/7520023/diff/5001/chrome/browser/policy/configuration_policy_pref_store.cc File chrome/browser/policy/configuration_policy_pref_store.cc (right): http://codereview.chromium.org/7520023/diff/5001/chrome/browser/policy/configuration_policy_pref_store.cc#newcode206 chrome/browser/policy/configuration_policy_pref_store.cc:206: prefs::kIncognitoEnabled }, On 2011/07/29 10:33:23, Mattias Nissler wrote: > ...
9 years, 4 months ago (2011-07-30 06:17:37 UTC) #7
Mattias Nissler (ping if slow)
A couple more issues with the policy->prefs conversion. http://codereview.chromium.org/7520023/diff/16001/chrome/browser/extensions/extension_tabs_apitest.cc File chrome/browser/extensions/extension_tabs_apitest.cc (right): http://codereview.chromium.org/7520023/diff/16001/chrome/browser/extensions/extension_tabs_apitest.cc#newcode204 chrome/browser/extensions/extension_tabs_apitest.cc:204: browser()->profile()->GetPrefs()->SetInteger( ...
9 years, 4 months ago (2011-08-01 11:13:40 UTC) #8
rustema
Btw, is there a lint (style issue discovery) tool? http://codereview.chromium.org/7520023/diff/16001/chrome/browser/extensions/extension_tabs_apitest.cc File chrome/browser/extensions/extension_tabs_apitest.cc (right): http://codereview.chromium.org/7520023/diff/16001/chrome/browser/extensions/extension_tabs_apitest.cc#newcode204 chrome/browser/extensions/extension_tabs_apitest.cc:204: ...
9 years, 4 months ago (2011-08-01 23:55:33 UTC) #9
Mattias Nissler (ping if slow)
Sorry for the delay. Almost there! http://codereview.chromium.org/7520023/diff/16001/chrome/browser/policy/configuration_policy_pref_store.cc File chrome/browser/policy/configuration_policy_pref_store.cc (right): http://codereview.chromium.org/7520023/diff/16001/chrome/browser/policy/configuration_policy_pref_store.cc#newcode592 chrome/browser/policy/configuration_policy_pref_store.cc:592: if (policy == ...
9 years, 4 months ago (2011-08-03 09:16:07 UTC) #10
rustema
http://codereview.chromium.org/7520023/diff/16001/chrome/browser/policy/configuration_policy_pref_store_unittest.cc File chrome/browser/policy/configuration_policy_pref_store_unittest.cc (right): http://codereview.chromium.org/7520023/diff/16001/chrome/browser/policy/configuration_policy_pref_store_unittest.cc#newcode712 chrome/browser/policy/configuration_policy_pref_store_unittest.cc:712: EXPECT_TRUE(Value::CreateIntegerValue(availability)->Equals(value)); On 2011/08/03 09:16:08, Mattias Nissler wrote: > On ...
9 years, 4 months ago (2011-08-04 07:00:49 UTC) #11
Mattias Nissler (ping if slow)
LGTM with a nit. http://codereview.chromium.org/7520023/diff/33001/chrome/browser/policy/configuration_policy_pref_store.cc File chrome/browser/policy/configuration_policy_pref_store.cc (right): http://codereview.chromium.org/7520023/diff/33001/chrome/browser/policy/configuration_policy_pref_store.cc#newcode695 chrome/browser/policy/configuration_policy_pref_store.cc:695: // If the obsolete policy ...
9 years, 4 months ago (2011-08-04 09:03:53 UTC) #12
rustema
Thanks for review! Submitting. http://codereview.chromium.org/7520023/diff/33001/chrome/browser/policy/configuration_policy_pref_store.cc File chrome/browser/policy/configuration_policy_pref_store.cc (right): http://codereview.chromium.org/7520023/diff/33001/chrome/browser/policy/configuration_policy_pref_store.cc#newcode695 chrome/browser/policy/configuration_policy_pref_store.cc:695: // If the obsolete policy ...
9 years, 4 months ago (2011-08-04 17:58:07 UTC) #13
commit-bot: I haz the power
Presubmit check for 7520023-39001 failed and returned exit status 1. Running presubmit commit checks ...
9 years, 4 months ago (2011-08-05 00:41:47 UTC) #14
rustema
Hi guys, I need your approval on chrome/browser/profiles/profile.cc. Can you please take a look? Thanks, ...
9 years, 4 months ago (2011-08-05 00:48:18 UTC) #15
sail
LGTM
9 years, 4 months ago (2011-08-05 00:49:46 UTC) #16
commit-bot: I haz the power
9 years, 4 months ago (2011-08-05 05:28:33 UTC) #17
Change committed as 95580

Powered by Google App Engine
This is Rietveld 408576698