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

Issue 5562002: Refactor FileBasedPolicyProvider, introduce AsynchronousPolicyProvider. (Closed)

Created:
10 years ago by danno
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Refactor FileBasedPolicyProvider, introduce AsynchronousPolicyProvider. Create a superclass of FileBasedPolicyProvider that abstracts how a provider can provide policy on the UI thread that is loaded from the FILE thread. BUG=65094 TEST=AsynchronousPolicyProvider.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=68735

Patch Set 1 #

Patch Set 2 : fix nits #

Total comments: 16

Patch Set 3 : remove extra provider in tests #

Total comments: 26

Patch Set 4 : review feedback #

Total comments: 94

Patch Set 5 : review feedback #

Total comments: 2

Patch Set 6 : fix mac tests #

Patch Set 7 : fix more unit tests #

Patch Set 8 : fix tests #

Patch Set 9 : more unit test fixes #

Total comments: 2

Patch Set 10 : fix file based provider threading problem #

Patch Set 11 : remove redundant code #

Patch Set 12 : merge with TOT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+962 lines, -534 lines) Patch
A chrome/browser/policy/asynchronous_policy_loader.h View 1 2 3 4 5 6 7 8 9 1 chunk +90 lines, -0 lines 0 comments Download
A chrome/browser/policy/asynchronous_policy_loader.cc View 1 2 3 4 5 6 1 chunk +75 lines, -0 lines 0 comments Download
A chrome/browser/policy/asynchronous_policy_loader_unittest.cc View 1 2 3 4 1 chunk +132 lines, -0 lines 0 comments Download
A chrome/browser/policy/asynchronous_policy_provider.h View 1 2 3 4 5 6 7 8 1 chunk +58 lines, -0 lines 0 comments Download
A chrome/browser/policy/asynchronous_policy_provider.cc View 1 2 3 4 5 6 7 8 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/browser/policy/asynchronous_policy_provider_unittest.cc View 1 2 3 4 5 6 1 chunk +54 lines, -0 lines 0 comments Download
A chrome/browser/policy/asynchronous_policy_test_base.h View 1 2 3 4 1 chunk +64 lines, -0 lines 0 comments Download
M chrome/browser/policy/config_dir_policy_provider.h View 1 2 3 4 2 chunks +18 lines, -17 lines 0 comments Download
M chrome/browser/policy/config_dir_policy_provider.cc View 3 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/policy/config_dir_policy_provider_unittest.cc View 1 2 3 4 9 10 5 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/configuration_policy_provider.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/configuration_policy_provider_mac.h View 1 2 3 4 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_mac.cc View 1 3 chunks +8 lines, -6 lines 0 comments Download
A chrome/browser/policy/file_based_policy_loader.h View 1 2 3 4 5 6 7 8 9 1 chunk +104 lines, -0 lines 0 comments Download
A chrome/browser/policy/file_based_policy_loader.cc View 1 2 3 4 5 6 7 8 9 1 chunk +205 lines, -0 lines 0 comments Download
M chrome/browser/policy/file_based_policy_provider.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -155 lines 0 comments Download
M chrome/browser/policy/file_based_policy_provider.cc View 1 2 3 1 chunk +9 lines, -229 lines 0 comments Download
M chrome/browser/policy/file_based_policy_provider_unittest.cc View 1 2 3 4 1 chunk +60 lines, -110 lines 0 comments Download
M chrome/browser/policy/mock_configuration_policy_provider.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/policy/mock_configuration_policy_provider.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
danno
please take a look.
10 years ago (2010-12-02 15:49:05 UTC) #1
battre (please use the other)
Thanks for sharing. I learned a lot. http://codereview.chromium.org/5562002/diff/17001/chrome/browser/policy/asynchronous_policy_loader.h File chrome/browser/policy/asynchronous_policy_loader.h (right): http://codereview.chromium.org/5562002/diff/17001/chrome/browser/policy/asynchronous_policy_loader.h#newcode23 chrome/browser/policy/asynchronous_policy_loader.h:23: int reload_interval_minutes); ...
10 years ago (2010-12-02 17:40:24 UTC) #2
Mattias Nissler (ping if slow)
some initial comments, will make a more thorough pass tomorrow morning. http://codereview.chromium.org/5562002/diff/22001/chrome/browser/policy/asynchronous_policy_loader.cc File chrome/browser/policy/asynchronous_policy_loader.cc (right): ...
10 years ago (2010-12-02 18:15:59 UTC) #3
danno
Please have another look. http://codereview.chromium.org/5562002/diff/17001/chrome/browser/policy/asynchronous_policy_loader.h File chrome/browser/policy/asynchronous_policy_loader.h (right): http://codereview.chromium.org/5562002/diff/17001/chrome/browser/policy/asynchronous_policy_loader.h#newcode23 chrome/browser/policy/asynchronous_policy_loader.h:23: int reload_interval_minutes); On 2010/12/02 17:40:25, ...
10 years ago (2010-12-03 17:05:38 UTC) #4
Mattias Nissler (ping if slow)
overall approach looks good, but lots of nits. http://codereview.chromium.org/5562002/diff/57001/chrome/browser/policy/asynchronous_policy_loader.cc File chrome/browser/policy/asynchronous_policy_loader.cc (right): http://codereview.chromium.org/5562002/diff/57001/chrome/browser/policy/asynchronous_policy_loader.cc#newcode16 chrome/browser/policy/asynchronous_policy_loader.cc:16: origin_loop_(MessageLoop::current()) ...
10 years ago (2010-12-06 10:26:20 UTC) #5
danno
addressed feedback, please take another look. http://codereview.chromium.org/5562002/diff/57001/chrome/browser/policy/asynchronous_policy_loader.cc File chrome/browser/policy/asynchronous_policy_loader.cc (right): http://codereview.chromium.org/5562002/diff/57001/chrome/browser/policy/asynchronous_policy_loader.cc#newcode16 chrome/browser/policy/asynchronous_policy_loader.cc:16: origin_loop_(MessageLoop::current()) {} On ...
10 years ago (2010-12-06 14:05:12 UTC) #6
Mattias Nissler (ping if slow)
LGTM.
10 years ago (2010-12-06 14:26:06 UTC) #7
danno
please review deltas, I had to make some changes to get the tests to work ...
10 years ago (2010-12-09 08:54:59 UTC) #8
Mattias Nissler (ping if slow)
LGTM with my two comments addressed. http://codereview.chromium.org/5562002/diff/61002/chrome/browser/policy/asynchronous_policy_loader.cc File chrome/browser/policy/asynchronous_policy_loader.cc (right): http://codereview.chromium.org/5562002/diff/61002/chrome/browser/policy/asynchronous_policy_loader.cc#newcode23 chrome/browser/policy/asynchronous_policy_loader.cc:23: DCHECK_EQ(MessageLoop::current(), origin_loop_); Why ...
10 years ago (2010-12-09 09:27:17 UTC) #9
danno
http://codereview.chromium.org/5562002/diff/61002/chrome/browser/policy/asynchronous_policy_loader.cc File chrome/browser/policy/asynchronous_policy_loader.cc (right): http://codereview.chromium.org/5562002/diff/61002/chrome/browser/policy/asynchronous_policy_loader.cc#newcode23 chrome/browser/policy/asynchronous_policy_loader.cc:23: DCHECK_EQ(MessageLoop::current(), origin_loop_); On 2010/12/09 09:27:17, Mattias Nissler wrote: > ...
10 years ago (2010-12-09 10:23:01 UTC) #10
Mattias Nissler (ping if slow)
10 years ago (2010-12-09 10:23:49 UTC) #11
LGTM then.

Powered by Google App Engine
This is Rietveld 408576698