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

Issue 12676017: Adding policy support to the new network configuration stack. (Closed)

Created:
7 years, 9 months ago by pneubeck (no reviews)
Modified:
7 years, 8 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, nkostylev+watch_chromium.org, gspencer+watch_chromium.org, gauravsh+watch_chromium.org, Aaron Boodman, arv+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Adding policy support to the new network configuration stack. Adapts in particular the ManagedNetworkConfigurationHandler, the networkingPrivate extension API and the network configuration extension. BUG=223869 TBR=thestig@chromium.org (for chrome_browser_chromeos.gypi) Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=195267

Patch Set 1 #

Patch Set 2 : Added credential sanitization. #

Patch Set 3 : Adding a unit test for the managed handler. #

Patch Set 4 : Added missing directory with test files. #

Patch Set 5 : Add comments to local helper functions and fixed some nits. #

Total comments: 14

Patch Set 6 : Remove policy initialized flags and wrap PolicyMaps with scoped_ptr. #

Total comments: 161

Patch Set 7 : Addressed comments. #

Patch Set 8 : Addressed remaining comments of Steven. #

Total comments: 6

Patch Set 9 : Addressed Julian's comments. Reuploaded with rebase. #

Total comments: 2

Patch Set 10 : Addressed Steven's comments. #

Patch Set 11 : Fixed the browser test. #

Patch Set 12 : Nit in the API description. #

Patch Set 13 : Rebased. #

Patch Set 14 : Fixed clang compilation. #

Patch Set 15 : Reupload. #

Total comments: 2

Patch Set 16 : Rebased. #

Patch Set 17 : Fixed clang errors. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2316 lines, -783 lines) Patch
M chrome/browser/chromeos/chrome_browser_main_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/cros/network_library_impl_base.cc View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/chromeos/cros/network_library_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/chromeos/extensions/networking_private_api.h View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/extensions/networking_private_api.cc View 1 2 3 4 5 6 7 8 5 chunks +44 lines, -15 lines 0 comments Download
M chrome/browser/chromeos/extensions/networking_private_apitest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +80 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/login_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +6 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/policy/network_configuration_updater.h View 1 2 3 4 5 6 3 chunks +15 lines, -71 lines 0 comments Download
M chrome/browser/chromeos/policy/network_configuration_updater.cc View 1 2 3 4 5 6 1 chunk +1 line, -157 lines 0 comments Download
A chrome/browser/chromeos/policy/network_configuration_updater_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +62 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/policy/network_configuration_updater_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +104 lines, -0 lines 0 comments Download
A + chrome/browser/chromeos/policy/network_configuration_updater_impl_cros.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +24 lines, -41 lines 0 comments Download
A + chrome/browser/chromeos/policy/network_configuration_updater_impl_cros.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +16 lines, -11 lines 0 comments Download
A + chrome/browser/chromeos/policy/network_configuration_updater_impl_cros_unittest.cc View 1 2 3 4 5 6 5 chunks +8 lines, -7 lines 0 comments Download
D chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -244 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 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/policy/browser_policy_connector.cc View 1 2 3 4 5 6 7 8 4 chunks +21 lines, -7 lines 0 comments Download
M chrome/browser/resources/chromeos/network_configuration/config.html View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/chromeos/network_configuration/js/main_config.js View 1 1 chunk +20 lines, -10 lines 0 comments Download
M chrome/browser/resources/chromeos/network_configuration/js/network_config.js View 1 2 3 4 5 6 1 chunk +82 lines, -16 lines 0 comments Download
M chrome/browser/resources/chromeos/network_configuration/js/network_status.js View 1 2 3 4 5 6 4 chunks +7 lines, -3 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -1 line 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/api/networking_private.json View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +27 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/networking/test.js View 1 2 3 4 5 6 7 8 9 10 8 chunks +62 lines, -15 lines 0 comments Download
M chromeos/chromeos.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -0 lines 0 comments Download
M chromeos/dbus/mock_shill_manager_client.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chromeos/dbus/mock_shill_manager_client.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chromeos/dbus/mock_shill_profile_client.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/dbus/shill_device_client.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chromeos/dbus/shill_manager_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +11 lines, -2 lines 0 comments Download
M chromeos/dbus/shill_manager_client.cc View 1 2 3 4 5 6 7 8 4 chunks +57 lines, -6 lines 0 comments Download
M chromeos/dbus/shill_manager_client_stub.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +5 lines, -0 lines 0 comments Download
M chromeos/dbus/shill_manager_client_stub.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +35 lines, -14 lines 0 comments Download
M chromeos/dbus/shill_profile_client.h View 1 2 3 4 5 6 2 chunks +17 lines, -0 lines 0 comments Download
M chromeos/dbus/shill_profile_client.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M chromeos/dbus/shill_profile_client_stub.h View 1 2 3 4 5 6 2 chunks +14 lines, -6 lines 0 comments Download
M chromeos/dbus/shill_profile_client_stub.cc View 1 2 3 4 5 6 4 chunks +111 lines, -14 lines 0 comments Download
M chromeos/dbus/shill_service_client.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chromeos/dbus/shill_service_client_stub.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M chromeos/dbus/shill_service_client_stub.cc View 1 2 4 chunks +29 lines, -18 lines 0 comments Download
M chromeos/network/managed_network_configuration_handler.h View 1 2 3 4 5 6 7 8 6 chunks +42 lines, -5 lines 0 comments Download
M chromeos/network/managed_network_configuration_handler.cc View 1 2 3 4 5 6 7 8 9 8 chunks +732 lines, -24 lines 0 comments Download
A chromeos/network/managed_network_configuration_handler_unittest.cc View 1 2 3 4 5 6 1 chunk +314 lines, -0 lines 0 comments Download
M chromeos/network/network_configuration_handler.cc View 1 2 3 4 5 6 2 chunks +27 lines, -5 lines 0 comments Download
M chromeos/network/network_state.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M chromeos/network/network_state.cc View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M chromeos/network/network_ui_data.h View 1 2 3 4 5 6 3 chunks +22 lines, -7 lines 0 comments Download
M chromeos/network/network_ui_data.cc View 1 2 3 4 5 6 7 8 4 chunks +23 lines, -1 line 0 comments Download
M chromeos/network/onc/onc_constants.h View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
M chromeos/network/onc/onc_constants.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chromeos/network/onc/onc_merger.h View 1 2 chunks +7 lines, -2 lines 0 comments Download
M chromeos/network/onc/onc_merger.cc View 1 2 3 4 5 6 15 chunks +152 lines, -49 lines 0 comments Download
M chromeos/network/onc/onc_merger_unittest.cc View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M chromeos/network/onc/onc_signature.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chromeos/network/onc/onc_translation_tables.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chromeos/network/onc/onc_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -2 lines 0 comments Download
M chromeos/network/onc/onc_utils.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/network/onc/onc_utils_unittest.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/test/data/network/augmented_merge.json View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
A chromeos/test/data/network/policy/policy_wifi1.onc View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
A chromeos/test/data/network/policy/shill_managed_wifi1.json View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -0 lines 0 comments Download
A chromeos/test/data/network/policy/shill_policy_on_unconfigured_wifi1.json View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
A chromeos/test/data/network/policy/shill_policy_on_unmanaged_user_wifi1.json View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
A chromeos/test/data/network/policy/shill_unmanaged_user_wifi1.json View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
pneubeck (no reviews)
Hi Greg, just a pre-pre-preview FYI :-) Most action is in managed_network_configuration_handler.cc It can already ...
7 years, 9 months ago (2013-03-22 17:01:39 UTC) #1
pneubeck (no reviews)
7 years, 8 months ago (2013-04-09 12:14:33 UTC) #2
Greg Spencer (Chromium)
https://codereview.chromium.org/12676017/diff/8003/chromeos/network/managed_network_configuration_handler.cc File chromeos/network/managed_network_configuration_handler.cc (right): https://codereview.chromium.org/12676017/diff/8003/chromeos/network/managed_network_configuration_handler.cc#newcode121 chromeos/network/managed_network_configuration_handler.cc:121: void DoNothing() { You can use base::DoNothing() instead of ...
7 years, 8 months ago (2013-04-10 01:14:15 UTC) #3
pneubeck (no reviews)
Hi Steven, could you take a look at the dbus/*client changes? Greg will look at ...
7 years, 8 months ago (2013-04-11 12:14:51 UTC) #4
pastarmovj
Almost there :) https://codereview.chromium.org/12676017/diff/23001/chrome/browser/chromeos/extensions/networking_private_api.cc File chrome/browser/chromeos/extensions/networking_private_api.cc (right): https://codereview.chromium.org/12676017/diff/23001/chrome/browser/chromeos/extensions/networking_private_api.cc#newcode151 chrome/browser/chromeos/extensions/networking_private_api.cc:151: // The |network_guid| parameter is storing ...
7 years, 8 months ago (2013-04-11 14:46:29 UTC) #5
stevenjb
https://codereview.chromium.org/12676017/diff/23001/chrome/browser/chromeos/extensions/networking_private_api.h File chrome/browser/chromeos/extensions/networking_private_api.h (right): https://codereview.chromium.org/12676017/diff/23001/chrome/browser/chromeos/extensions/networking_private_api.h#newcode55 chrome/browser/chromeos/extensions/networking_private_api.h:55: // Callbacks if talking to ManagedNetworkConfigurationHandler. On 2013/04/11 14:46:29, ...
7 years, 8 months ago (2013-04-11 18:20:07 UTC) #6
pneubeck (no reviews)
Thanks for all the comments! I addressed most issues. In a few cases, I have ...
7 years, 8 months ago (2013-04-15 12:16:23 UTC) #7
stevenjb
https://codereview.chromium.org/12676017/diff/23001/chrome/browser/chromeos/extensions/networking_private_apitest.cc File chrome/browser/chromeos/extensions/networking_private_apitest.cc (right): https://codereview.chromium.org/12676017/diff/23001/chrome/browser/chromeos/extensions/networking_private_apitest.cc#newcode166 chrome/browser/chromeos/extensions/networking_private_apitest.cc:166: "}"; On 2013/04/15 12:16:24, pneubeck wrote: > On 2013/04/11 ...
7 years, 8 months ago (2013-04-15 17:38:54 UTC) #8
pneubeck (no reviews)
https://codereview.chromium.org/12676017/diff/23001/chromeos/network/managed_network_configuration_handler.cc File chromeos/network/managed_network_configuration_handler.cc (right): https://codereview.chromium.org/12676017/diff/23001/chromeos/network/managed_network_configuration_handler.cc#newcode157 chromeos/network/managed_network_configuration_handler.cc:157: if (value->GetAsDictionary(&nested_object)) { On 2013/04/15 17:38:54, stevenjb (chromium) wrote: ...
7 years, 8 months ago (2013-04-16 07:50:06 UTC) #9
pastarmovj
Almost there :) https://codereview.chromium.org/12676017/diff/23001/chromeos/dbus/shill_profile_client.cc File chromeos/dbus/shill_profile_client.cc (right): https://codereview.chromium.org/12676017/diff/23001/chromeos/dbus/shill_profile_client.cc#newcode53 chromeos/dbus/shill_profile_client.cc:53: return NULL; On 2013/04/15 12:16:24, pneubeck ...
7 years, 8 months ago (2013-04-16 11:31:17 UTC) #10
pneubeck (no reviews)
https://codereview.chromium.org/12676017/diff/58002/chrome/browser/policy/browser_policy_connector.cc File chrome/browser/policy/browser_policy_connector.cc (right): https://codereview.chromium.org/12676017/diff/58002/chrome/browser/policy/browser_policy_connector.cc#newcode409 chrome/browser/policy/browser_policy_connector.cc:409: network_configuration_updater_.reset(new NetworkConfigurationUpdaterImpl( On 2013/04/16 11:31:18, pastarmovj wrote: > nit: ...
7 years, 8 months ago (2013-04-16 14:56:28 UTC) #11
pastarmovj
LGTM.
7 years, 8 months ago (2013-04-16 15:06:29 UTC) #12
stevenjb
lgtm https://codereview.chromium.org/12676017/diff/73064/chromeos/network/managed_network_configuration_handler.cc File chromeos/network/managed_network_configuration_handler.cc (right): https://codereview.chromium.org/12676017/diff/73064/chromeos/network/managed_network_configuration_handler.cc#newcode165 chromeos/network/managed_network_configuration_handler.cc:165: // If |value| is a string and a ...
7 years, 8 months ago (2013-04-16 16:02:39 UTC) #13
stevenjb
lgtm
7 years, 8 months ago (2013-04-16 16:02:41 UTC) #14
pneubeck (no reviews)
Hi Benjamin, please owner-review the *extension* files. Thanks.
7 years, 8 months ago (2013-04-17 07:59:07 UTC) #15
not at google - send to devlin
https://codereview.chromium.org/12676017/diff/88001/chrome/common/extensions/api/networking_private.json File chrome/common/extensions/api/networking_private.json (right): https://codereview.chromium.org/12676017/diff/88001/chrome/common/extensions/api/networking_private.json#newcode75 chrome/common/extensions/api/networking_private.json:75: "description": "Gets the merged properties of the network with ...
7 years, 8 months ago (2013-04-17 17:56:19 UTC) #16
not at google - send to devlin
API review style comment: Can you merge getManagedProperties with getProperties? Make getProperties take an optional ...
7 years, 8 months ago (2013-04-18 16:03:01 UTC) #17
pneubeck (no reviews)
On 2013/04/18 16:03:01, kalman wrote: > API review style comment: > > Can you merge ...
7 years, 8 months ago (2013-04-18 20:22:20 UTC) #18
not at google - send to devlin
Ok. I just don't understand the API call, but if it's only ever used internally, ...
7 years, 8 months ago (2013-04-18 20:24:08 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pneubeck@chromium.org/12676017/64013
7 years, 8 months ago (2013-04-19 14:48:08 UTC) #20
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 8 months ago (2013-04-19 15:15:43 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pneubeck@chromium.org/12676017/101007
7 years, 8 months ago (2013-04-19 15:45:07 UTC) #22
commit-bot: I haz the power
Retried try job too often on win7_aura for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win7_aura&number=30794
7 years, 8 months ago (2013-04-19 17:54:46 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pneubeck@chromium.org/12676017/101007
7 years, 8 months ago (2013-04-19 18:29:13 UTC) #24
commit-bot: I haz the power
Change committed as 195267
7 years, 8 months ago (2013-04-19 20:35:09 UTC) #25
pneubeck (no reviews)
7 years, 8 months ago (2013-04-20 06:16:17 UTC) #26
Lei Zhang
7 years, 8 months ago (2013-04-21 23:55:41 UTC) #27
Message was sent while issue was closed.
gypi file lgtm.

Powered by Google App Engine
This is Rietveld 408576698