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

Issue 10909228: Add PathService::RemoveOverride to clear path overrides. (Closed)

Created:
8 years, 3 months ago by pastarmovj
Modified:
8 years, 2 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Add PathService::RemoveOverride to clear path overrides. This is especially useful for unit tests because they live in the same process and share all the singletons including PathService. One can of course override the overrides but it is much cleaner and sometimes the only good solution to return to the original PathProvider instead. BUG=149161 TEST=base_unittests:PathServiceTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=158842

Patch Set 1 #

Total comments: 15

Patch Set 2 : Refactored the locking semantics. #

Total comments: 4

Patch Set 3 : Addressed comments and a problem on windows. #

Patch Set 4 : Cleaned up a typo in unit tests file. #

Total comments: 4

Patch Set 5 : Addressed suggestions. #

Patch Set 6 : Made the tests even more OS independent. #

Total comments: 7

Patch Set 7 : Addressed nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -46 lines) Patch
M base/path_service.h View 1 2 2 chunks +8 lines, -3 lines 0 comments Download
M base/path_service.cc View 1 2 3 4 5 6 5 chunks +59 lines, -43 lines 0 comments Download
M base/path_service_unittest.cc View 1 2 3 4 5 1 chunk +45 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
pastarmovj
Hi Jim, can you please review a small addition to the PathService which I intend ...
8 years, 3 months ago (2012-09-14 10:26:46 UTC) #1
jar (doing other things)
I wasn't fully convinced by the description or the bug. Why is this a good ...
8 years, 3 months ago (2012-09-15 02:01:20 UTC) #2
pastarmovj
I think RemoveOverride is going to be useful and is not more dangerous than the ...
8 years, 3 months ago (2012-09-17 16:30:40 UTC) #3
jar (doing other things)
https://chromiumcodereview.appspot.com/10909228/diff/1/base/path_service.cc File base/path_service.cc (right): https://chromiumcodereview.appspot.com/10909228/diff/1/base/path_service.cc#newcode207 base/path_service.cc:207: Provider* provider = path_data->providers; On 2012/09/17 16:30:40, pastarmovj wrote: ...
8 years, 3 months ago (2012-09-17 17:06:08 UTC) #4
pastarmovj
Thanks for the extensive review! Cleaned up the code according to your suggestions. PTAL. https://chromiumcodereview.appspot.com/10909228/diff/1/base/path_service.cc ...
8 years, 3 months ago (2012-09-18 14:27:13 UTC) #5
jar (doing other things)
https://chromiumcodereview.appspot.com/10909228/diff/17001/base/path_service.cc File base/path_service.cc (right): https://chromiumcodereview.appspot.com/10909228/diff/17001/base/path_service.cc#newcode146 base/path_service.cc:146: path_data->cache[key] = path; This line of code (which is ...
8 years, 3 months ago (2012-09-18 16:47:17 UTC) #6
pastarmovj
Addressed the last round of comments. https://chromiumcodereview.appspot.com/10909228/diff/17001/base/path_service.cc File base/path_service.cc (right): https://chromiumcodereview.appspot.com/10909228/diff/17001/base/path_service.cc#newcode146 base/path_service.cc:146: path_data->cache[key] = path; ...
8 years, 3 months ago (2012-09-19 11:24:28 UTC) #7
jar (doing other things)
https://chromiumcodereview.appspot.com/10909228/diff/19006/base/path_service.cc File base/path_service.cc (right): https://chromiumcodereview.appspot.com/10909228/diff/19006/base/path_service.cc#newcode179 base/path_service.cc:179: Provider* provider = NULL; nit: move to in front ...
8 years, 3 months ago (2012-09-20 01:51:19 UTC) #8
pastarmovj
https://chromiumcodereview.appspot.com/10909228/diff/19006/base/path_service.cc File base/path_service.cc (right): https://chromiumcodereview.appspot.com/10909228/diff/19006/base/path_service.cc#newcode179 base/path_service.cc:179: Provider* provider = NULL; On 2012/09/20 01:51:19, jar wrote: ...
8 years, 3 months ago (2012-09-20 09:32:18 UTC) #9
jar (doing other things)
lgtm https://chromiumcodereview.appspot.com/10909228/diff/19006/base/path_service.cc File base/path_service.cc (right): https://chromiumcodereview.appspot.com/10909228/diff/19006/base/path_service.cc#newcode199 base/path_service.cc:199: // NOTE: it should be safe to iterate ...
8 years, 3 months ago (2012-09-20 16:30:32 UTC) #10
pastarmovj
Thanks for the review! Brett are you ok with this change too?
8 years, 3 months ago (2012-09-20 16:39:01 UTC) #11
brettw
jar's review should be sufficient unless there's some specific question you have for me.
8 years, 3 months ago (2012-09-24 22:50:12 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pastarmovj@chromium.org/10909228/27001
8 years, 2 months ago (2012-09-26 09:26:06 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pastarmovj@chromium.org/10909228/27001
8 years, 2 months ago (2012-09-26 15:16:14 UTC) #14
commit-bot: I haz the power
8 years, 2 months ago (2012-09-26 19:05:14 UTC) #15
Change committed as 158842

Powered by Google App Engine
This is Rietveld 408576698