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

Issue 5153002: Use a service to create device management backends. (Closed)

Created:
10 years, 1 month ago by Mattias Nissler (ping if slow)
Modified:
9 years, 7 months ago
Reviewers:
markusheintz_, Nico
CC:
chromium-reviews, darin-cc_chromium.org, cbentzel+watch_chromium.org, Paweł Hajdan Jr., pam+watch_chromium.org, ben+cc_chromium.org, danno, gfeher, Jakob Kummerow (corp)
Visibility:
Public.

Description

Use a service to create device management backends. Move responsibility for creating backend objects to a device management service object that lives in the profile. Doing allows us to make use of the profile's request context, which has the advantage over the independent request context implementation that stuff is more efficient (i.e. we need to only resolve the proxy once). BUG=63608 TEST=device_management_service_(unit|browser)test.cc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66948

Patch Set 1 #

Total comments: 19

Patch Set 2 : Note the difference! #

Patch Set 3 : Address comments. #

Total comments: 13
Unified diffs Side-by-side diffs Delta from patch set Stats (+856 lines, -440 lines) Patch
M chrome/browser/policy/configuration_policy_pref_store.cc View 2 chunks +2 lines, -1 line 0 comments Download
D chrome/browser/policy/device_management_backend_impl.h View 1 2 2 chunks +24 lines, -44 lines 0 comments Download
D chrome/browser/policy/device_management_backend_impl.cc View 1 2 5 chunks +208 lines, -236 lines 0 comments Download
M chrome/browser/policy/device_management_backend_mock.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/policy/device_management_policy_provider.h View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/policy/device_management_policy_provider.cc View 1 2 5 chunks +5 lines, -19 lines 0 comments Download
A chrome/browser/policy/device_management_service.h View 1 2 1 chunk +104 lines, -0 lines 0 comments Download
A chrome/browser/policy/device_management_service.cc View 1 2 1 chunk +185 lines, -0 lines 4 comments Download
A + chrome/browser/policy/device_management_service_browsertest.cc View 1 2 9 chunks +25 lines, -23 lines 0 comments Download
A + chrome/browser/policy/device_management_service_unittest.cc View 1 2 13 chunks +134 lines, -45 lines 0 comments Download
A chrome/browser/policy/profile_policy_context.h View 1 chunk +51 lines, -0 lines 5 comments Download
A chrome/browser/policy/profile_policy_context.cc View 1 chunk +52 lines, -0 lines 2 comments Download
M chrome/browser/profile.h View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/profile.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/profile_impl.h View 1 2 3 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/profile_impl.cc View 1 2 5 chunks +9 lines, -23 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
A chrome/test/test_url_request_context_getter.h View 1 chunk +33 lines, -0 lines 2 comments Download
M chrome/test/testing_profile.h View 1 2 1 chunk +1 line, -4 lines 0 comments Download
M chrome/test/testing_profile.cc View 2 chunks +1 line, -20 lines 0 comments Download
M net/tools/testserver/device_management.py View 1 2 2 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Mattias Nissler (ping if slow)
This is a follow-up to http://codereview.chromium.org/5178005/ and replaces http://codereview.chromium.org/5026001/, which is no obsolete. Markus, Nico: ...
10 years, 1 month ago (2010-11-18 15:26:59 UTC) #1
Nico
Maybe pin this to the bug the other cl was pinned to. http://codereview.chromium.org/5153002/diff/1/chrome/browser/profile.h File chrome/browser/profile.h ...
10 years, 1 month ago (2010-11-18 15:36:33 UTC) #2
markusheintz_
Some quick stuff. http://codereview.chromium.org/5153002/diff/1/chrome/browser/policy/device_management_policy_provider.cc File chrome/browser/policy/device_management_policy_provider.cc (right): http://codereview.chromium.org/5153002/diff/1/chrome/browser/policy/device_management_policy_provider.cc#newcode23 chrome/browser/policy/device_management_policy_provider.cc:23: const char kChromePolicyScope[] = "cros/device"; please ...
10 years, 1 month ago (2010-11-18 16:12:49 UTC) #3
Mattias Nissler (ping if slow)
Addressed all your comments for continued reviewing pleasure! Please take another look :) http://codereview.chromium.org/5153002/diff/1/chrome/browser/policy/device_management_policy_provider.cc File ...
10 years, 1 month ago (2010-11-19 16:03:56 UTC) #4
markusheintz_
LGTM http://codereview.chromium.org/5153002/diff/1/chrome/browser/policy/device_management_service.cc File chrome/browser/policy/device_management_service.cc (right): http://codereview.chromium.org/5153002/diff/1/chrome/browser/policy/device_management_service.cc#newcode42 chrome/browser/policy/device_management_service.cc:42: const char kServiceParamDeviceID[] = "deviceid"; On 2010/11/19 16:03:56, ...
10 years, 1 month ago (2010-11-19 17:13:12 UTC) #5
Mattias Nissler (ping if slow)
Nico, do you want to take another look at this?
10 years, 1 month ago (2010-11-22 10:20:53 UTC) #6
Nico
LG, but a few questions. Ignore the "why is this override needed?" question (I'm too ...
10 years, 1 month ago (2010-11-22 11:06:06 UTC) #7
Mattias Nissler (ping if slow)
Nico, here are answers to your questions. I didn't make any code changes. http://codereview.chromium.org/5153002/diff/13002/chrome/browser/policy/device_management_service.cc File ...
10 years, 1 month ago (2010-11-22 12:35:39 UTC) #8
Nico
SLG (…but note that I'm not terribly familiar with this policy code) If the answer ...
10 years, 1 month ago (2010-11-22 12:40:16 UTC) #9
Mattias Nissler (ping if slow)
10 years, 1 month ago (2010-11-22 14:08:07 UTC) #10
Answered the last question. Good to go now?

http://codereview.chromium.org/5153002/diff/13002/chrome/browser/policy/profi...
File chrome/browser/policy/profile_policy_context.cc (right):

http://codereview.chromium.org/5153002/diff/13002/chrome/browser/policy/profi...
chrome/browser/policy/profile_policy_context.cc:37:
device_management_service_->Initialize(profile_->GetRequestContext());
On 2010/11/22 12:40:16, Nico wrote:
> can you DCHECK that the prefs aren't initialized already?

They are already initialized at this point, and that's intentional. The point of
this approach is to decouple the network I/O bits from the pref service
initialization (because prefs is initialized at a point where we don't have a
request context).

Powered by Google App Engine
This is Rietveld 408576698