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

Issue 11689004: Move PromoResourceService from Profile to BrowserProcessImpl/local_state(). (Closed)

Created:
7 years, 12 months ago by Dan Beam
Modified:
7 years, 11 months ago
CC:
chromium-reviews, dbeam+watch-ntp_chromium.org, estade+watch_chromium.org, rginda+watch_chromium.org, pedrosimonetti+watch_chromium.org, Cait (Slow), aruslan, Robert Sesek, msarda
Visibility:
Public.

Description

Move PromoResourceService from Profile to BrowserProcessImpl/local_state(). TBR=rsesek@chromium.org BUG=120996, 143773 TEST=tests pass, we still get promos, less crud on profile. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=175103

Patch Set 1 #

Patch Set 2 : nits #

Patch Set 3 : fun #

Patch Set 4 : android #

Patch Set 5 : IWYU #

Patch Set 6 : android x 2 #

Patch Set 7 : rebase #

Patch Set 8 : stupid android #

Patch Set 9 : android x 3 #

Patch Set 10 : win compile #

Patch Set 11 : android x 4 #

Total comments: 12

Patch Set 12 : . #

Patch Set 13 : clang #

Patch Set 14 : clang #

Total comments: 2

Patch Set 15 : fix #

Patch Set 16 : nits #

Total comments: 9

Patch Set 17 : setlocalstate #

Patch Set 18 : cleanup #

Patch Set 19 : nits #

Patch Set 20 : removing teardown, tests were DCHECK()ing #

Patch Set 21 : clang #

Total comments: 5

Patch Set 22 : revert TestingBrowserProcess::GetGlobal() for now #

Patch Set 23 : headers #

Patch Set 24 : rebase #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -236 lines) Patch
M chrome/browser/browser_process_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 7 chunks +31 lines, -20 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/profiles/off_the_record_profile_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +0 lines, -8 lines 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/ui/webui/ntp/android/promo_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +9 lines, -15 lines 0 comments Download
M chrome/browser/ui/webui/ntp/new_tab_page_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +4 lines, -9 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_resource_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/web_resource/notification_promo.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +5 lines, -10 lines 0 comments Download
M chrome/browser/web_resource/notification_promo.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 12 chunks +19 lines, -26 lines 1 comment Download
M chrome/browser/web_resource/notification_promo_mobile_ntp.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/web_resource/notification_promo_mobile_ntp.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/web_resource/promo_resource_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +1 line, -6 lines 0 comments Download
M chrome/browser/web_resource/promo_resource_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +11 lines, -16 lines 1 comment Download
M chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 7 chunks +11 lines, -25 lines 0 comments Download
M chrome/browser/web_resource/promo_resource_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 20 chunks +28 lines, -71 lines 0 comments Download
M chrome/test/base/testing_browser_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/base/testing_profile.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 32 (0 generated)
Dan Beam
rlp@/achuith@: can you see if this is the right direction before I go much further?
7 years, 12 months ago (2012-12-28 05:38:22 UTC) #1
rpetterson
On 2012/12/28 05:38:22, Dan Beam wrote: > rlp@/achuith@: can you see if this is the ...
7 years, 12 months ago (2012-12-28 17:40:39 UTC) #2
Dan Beam
+rsesek@/aruslan@ as FYI
7 years, 12 months ago (2012-12-28 17:43:51 UTC) #3
aruslan
LGTM; if there would be issues on Android I'll fix them. Adding msarda@ for iOS ...
7 years, 12 months ago (2012-12-28 18:07:16 UTC) #4
Dan Beam
OK, well, there doesn't seem to be much objection to this so far, so let's ...
7 years, 12 months ago (2012-12-29 02:36:32 UTC) #5
Dan Beam
whoops, jam@/estade@/bauerb@, see https://chromiumcodereview.appspot.com/11689004/#msg5
7 years, 12 months ago (2012-12-29 02:37:36 UTC) #6
Dan Beam
(and jcivelli@ as well)
7 years, 12 months ago (2012-12-29 02:48:05 UTC) #7
msarda
LGTM - I'll handle the iOS issues if any. @aruslan: Thank you for adding me ...
7 years, 11 months ago (2012-12-31 08:58:34 UTC) #8
Bernhard Bauer
https://chromiumcodereview.appspot.com/11689004/diff/3007/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://chromiumcodereview.appspot.com/11689004/diff/3007/chrome/browser/browser_process_impl.cc#newcode844 chrome/browser/browser_process_impl.cc:844: !promo_resource_service_) { When can it happen that |promo_resource_service_| is ...
7 years, 11 months ago (2012-12-31 11:51:52 UTC) #9
Dan Beam
https://chromiumcodereview.appspot.com/11689004/diff/3007/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://chromiumcodereview.appspot.com/11689004/diff/3007/chrome/browser/browser_process_impl.cc#newcode844 chrome/browser/browser_process_impl.cc:844: !promo_resource_service_) { On 2012/12/31 11:51:52, Bernhard Bauer wrote: > ...
7 years, 11 months ago (2013-01-02 04:36:34 UTC) #10
Bernhard Bauer
LGTM with some cleanups: https://chromiumcodereview.appspot.com/11689004/diff/3007/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://chromiumcodereview.appspot.com/11689004/diff/3007/chrome/browser/browser_process_impl.cc#newcode844 chrome/browser/browser_process_impl.cc:844: !promo_resource_service_) { On 2013/01/02 04:36:35, ...
7 years, 11 months ago (2013-01-02 10:57:43 UTC) #11
jam
lgtm for the two files with nits https://codereview.chromium.org/11689004/diff/3007/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/11689004/diff/3007/chrome/browser/browser_process_impl.cc#newcode844 chrome/browser/browser_process_impl.cc:844: !promo_resource_service_) { ...
7 years, 11 months ago (2013-01-02 15:59:00 UTC) #12
Jay Civelli
test change LGTM
7 years, 11 months ago (2013-01-02 16:58:38 UTC) #13
Dan Beam
for jam@/bauerb@ https://codereview.chromium.org/11689004/diff/3007/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/11689004/diff/3007/chrome/browser/browser_process_impl.cc#newcode844 chrome/browser/browser_process_impl.cc:844: !promo_resource_service_) { On 2013/01/02 15:59:00, John Abd-El-Malek ...
7 years, 11 months ago (2013-01-02 18:10:31 UTC) #14
jam
https://codereview.chromium.org/11689004/diff/3007/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/11689004/diff/3007/chrome/browser/browser_process_impl.cc#newcode844 chrome/browser/browser_process_impl.cc:844: !promo_resource_service_) { On 2013/01/02 18:10:32, Dan Beam wrote: > ...
7 years, 11 months ago (2013-01-02 18:14:54 UTC) #15
Evan Stade
https://codereview.chromium.org/11689004/diff/28002/chrome/browser/web_resource/notification_promo.h File chrome/browser/web_resource/notification_promo.h (left): https://codereview.chromium.org/11689004/diff/28002/chrome/browser/web_resource/notification_promo.h#oldcode97 chrome/browser/web_resource/notification_promo.h:97: PrefService* prefs_; why did you change this to a ...
7 years, 11 months ago (2013-01-02 22:08:43 UTC) #16
Dan Beam
https://codereview.chromium.org/11689004/diff/3007/chrome/browser/browser_process_impl.h File chrome/browser/browser_process_impl.h (right): https://codereview.chromium.org/11689004/diff/3007/chrome/browser/browser_process_impl.h#newcode282 chrome/browser/browser_process_impl.h:282: scoped_refptr<PromoResourceService> promo_resource_service_; On 2013/01/02 15:59:00, John Abd-El-Malek wrote: > ...
7 years, 11 months ago (2013-01-02 22:27:51 UTC) #17
Evan Stade
On 2013/01/02 22:27:51, Dan Beam wrote: > https://codereview.chromium.org/11689004/diff/3007/chrome/browser/browser_process_impl.h > File chrome/browser/browser_process_impl.h (right): > > https://codereview.chromium.org/11689004/diff/3007/chrome/browser/browser_process_impl.h#newcode282 ...
7 years, 11 months ago (2013-01-02 22:56:13 UTC) #18
Evan Stade
thanks lgtm https://chromiumcodereview.appspot.com/11689004/diff/30005/chrome/browser/web_resource/promo_resource_service.cc File chrome/browser/web_resource/promo_resource_service.cc (right): https://chromiumcodereview.appspot.com/11689004/diff/30005/chrome/browser/web_resource/promo_resource_service.cc#newcode96 chrome/browser/web_resource/promo_resource_service.cc:96: // For testing. put this comment in ...
7 years, 11 months ago (2013-01-03 05:01:08 UTC) #19
Dan Beam
https://chromiumcodereview.appspot.com/11689004/diff/30005/chrome/browser/web_resource/promo_resource_service.cc File chrome/browser/web_resource/promo_resource_service.cc (right): https://chromiumcodereview.appspot.com/11689004/diff/30005/chrome/browser/web_resource/promo_resource_service.cc#newcode106 chrome/browser/web_resource/promo_resource_service.cc:106: ScheduleNotificationOnInitForTesting(prefs); this is triggering a presubmit warning, I'll see ...
7 years, 11 months ago (2013-01-03 05:05:47 UTC) #20
achuithb
https://chromiumcodereview.appspot.com/11689004/diff/30005/chrome/browser/web_resource/promo_resource_service.cc File chrome/browser/web_resource/promo_resource_service.cc (right): https://chromiumcodereview.appspot.com/11689004/diff/30005/chrome/browser/web_resource/promo_resource_service.cc#newcode106 chrome/browser/web_resource/promo_resource_service.cc:106: ScheduleNotificationOnInitForTesting(prefs); On 2013/01/03 05:05:47, Dan Beam wrote: > this ...
7 years, 11 months ago (2013-01-03 05:42:51 UTC) #21
Dan Beam
achuith@: btw, can you do a chrome/browser/web_resource/OWNERS review? I asked earlier on, but it might've ...
7 years, 11 months ago (2013-01-03 09:08:21 UTC) #22
Dan Beam
+rsesek for chrome/browser/web_resource (didn't notice that achuith@ is OOO)
7 years, 11 months ago (2013-01-03 21:27:10 UTC) #23
Robert Sesek
https://chromiumcodereview.appspot.com/11689004/diff/30005/chrome/browser/web_resource/notification_promo.cc File chrome/browser/web_resource/notification_promo.cc (right): https://chromiumcodereview.appspot.com/11689004/diff/30005/chrome/browser/web_resource/notification_promo.cc#newcode195 chrome/browser/web_resource/notification_promo.cc:195: : prefs_(g_browser_process->local_state()), Can you dependency inject this, potentially allowing ...
7 years, 11 months ago (2013-01-03 21:40:10 UTC) #24
Dan Beam
https://chromiumcodereview.appspot.com/11689004/diff/30005/chrome/browser/web_resource/notification_promo.cc File chrome/browser/web_resource/notification_promo.cc (right): https://chromiumcodereview.appspot.com/11689004/diff/30005/chrome/browser/web_resource/notification_promo.cc#newcode195 chrome/browser/web_resource/notification_promo.cc:195: : prefs_(g_browser_process->local_state()), On 2013/01/03 21:40:10, rsesek wrote: > Can ...
7 years, 11 months ago (2013-01-03 22:47:37 UTC) #25
Robert Sesek
https://chromiumcodereview.appspot.com/11689004/diff/30034/chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc File chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc (right): https://chromiumcodereview.appspot.com/11689004/diff/30034/chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc#newcode29 chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc:29: TestingBrowserProcess::GetGlobal()->SetLocalState(local_state_.Get()); This needs to be NULLed in the dtor, ...
7 years, 11 months ago (2013-01-04 01:16:13 UTC) #26
Dan Beam
https://chromiumcodereview.appspot.com/11689004/diff/30034/chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc File chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc (right): https://chromiumcodereview.appspot.com/11689004/diff/30034/chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc#newcode29 chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc:29: TestingBrowserProcess::GetGlobal()->SetLocalState(local_state_.Get()); On 2013/01/04 01:16:13, rsesek wrote: > This needs ...
7 years, 11 months ago (2013-01-04 01:34:41 UTC) #27
Dan Beam
OK, moved that method to a different CL. I'll address anything else in a follow ...
7 years, 11 months ago (2013-01-04 01:43:56 UTC) #28
msarda
https://codereview.chromium.org/11689004/diff/27028/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/11689004/diff/27028/chrome/browser/browser_process_impl.cc#newcode791 chrome/browser/browser_process_impl.cc:791: if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) Please note that the pushed version does ...
7 years, 11 months ago (2013-01-04 09:54:38 UTC) #29
Dan Beam
On 2013/01/04 09:54:38, msarda wrote: > https://codereview.chromium.org/11689004/diff/27028/chrome/browser/browser_process_impl.cc > File chrome/browser/browser_process_impl.cc (right): > > https://codereview.chromium.org/11689004/diff/27028/chrome/browser/browser_process_impl.cc#newcode791 > ...
7 years, 11 months ago (2013-01-04 17:44:57 UTC) #30
Robert Sesek
LGTM
7 years, 11 months ago (2013-01-04 17:48:18 UTC) #31
achuithb
7 years, 11 months ago (2013-01-08 21:57:33 UTC) #32
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/11689004/diff/39007/chrome/browser/web_resour...
File chrome/browser/web_resource/notification_promo.cc (right):

https://codereview.chromium.org/11689004/diff/39007/chrome/browser/web_resour...
chrome/browser/web_resource/notification_promo.cc:321: // TODO(dbeam): Remove in
M28 when we're reasonably sure all prefs are gone.
Should probably file a bug to track this and add it to the comment.

https://codereview.chromium.org/11689004/diff/39007/chrome/browser/web_resour...
File chrome/browser/web_resource/promo_resource_service.cc (right):

https://codereview.chromium.org/11689004/diff/39007/chrome/browser/web_resour...
chrome/browser/web_resource/promo_resource_service.cc:71: // TODO(dbeam): remove
in M28 when all prefs have been cleared.
Same.

Powered by Google App Engine
This is Rietveld 408576698