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

Issue 7467012: Modifying prefetch to account for multi-profile. (Closed)

Created:
9 years, 5 months ago by rpetterson
Modified:
9 years, 3 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, GeorgeY, Paweł Hajdan Jr., dhollowa, amit, Ilya Sherman
Visibility:
Public.

Description

Modifying prefetch to account for multi-profile. Items of note: - predictor_api is gone. Most functions in predictor_api.cc have moved into the chrome_browser_net::Predictor class or the Profile class. - The predictor state is cleaned up in the Profile dtor. - Predictor is owned by the ProfileIOData of the profile. - InitialObserver class is gone since each profile keeps their own info, the non-OTR don't care if anyone is OTR. - Predictor is created by the profile and then passed to the ProfileIOData. Then its initialization is finished on the IOThread. - ConnectInterceptor now subclasses off of UrlRequestJobFactory::Interceptor. - Updated Profile to create a SimpleShutdownPredictor with limited functionality when in unittests. BUG=89937, 90114 TEST=passes existing Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=97446 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=100555

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 22

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : Modifying prefetch to account for multi-profile. #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Total comments: 59

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Total comments: 50

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Total comments: 10

Patch Set 19 : '' #

Total comments: 2

Patch Set 20 : '' #

Patch Set 21 : '' #

Total comments: 2

Patch Set 22 : '' #

Patch Set 23 : '' #

Patch Set 24 : '' #

Patch Set 25 : '' #

Patch Set 26 : '' #

Patch Set 27 : '' #

Patch Set 28 : '' #

Patch Set 29 : '' #

Patch Set 30 : '' #

Patch Set 31 : '' #

Patch Set 32 : '' #

Patch Set 33 : '' #

Patch Set 34 : '' #

Patch Set 35 : '' #

Patch Set 36 : '' #

Patch Set 37 : '' #

Patch Set 38 : '' #

Patch Set 39 : '' #

Patch Set 40 : '' #

Patch Set 41 : '' #

Patch Set 42 : Modifying prefetch to account for multi-profile. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+1253 lines, -631 lines) Patch
M chrome/browser/autocomplete/autocomplete_edit.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/autofill/autofill_browsertest.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/browser_about_handler.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +6 lines, -4 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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/browser_shutdown.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +0 lines, -5 lines 0 comments Download
M chrome/browser/browsing_data_remover.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/chrome_browser_main.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chrome_browser_main.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 4 chunks +84 lines, -15 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +7 lines, -1 line 0 comments Download
M chrome/browser/io_thread.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 5 chunks +4 lines, -48 lines 0 comments Download
M chrome/browser/io_thread.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 6 chunks +0 lines, -99 lines 0 comments Download
M chrome/browser/net/connect_interceptor.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 3 chunks +19 lines, -11 lines 0 comments Download
M chrome/browser/net/connect_interceptor.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 7 chunks +18 lines, -15 lines 0 comments Download
M chrome/browser/net/net_pref_observer.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 3 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/net/net_pref_observer.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/net/predictor.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 10 chunks +210 lines, -40 lines 0 comments Download
M chrome/browser/net/predictor.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 12 chunks +688 lines, -240 lines 0 comments Download
M chrome/browser/net/predictor_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 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 19 chunks +82 lines, -109 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +2 lines, -2 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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +6 lines, -0 lines 3 comments Download
M chrome/browser/profiles/profile.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +4 lines, -0 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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +3 lines, -0 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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 6 chunks +19 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 3 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 6 chunks +27 lines, -8 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_view_host_observer.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/chrome_render_view_host_observer.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 3 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/ui/browser_init.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +0 lines, -2 lines 0 comments Download
M chrome_frame/test/net/fake_external_tab.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +4 lines, -4 lines 0 comments Download
M net/url_request/url_request.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 36 (0 generated)
rpetterson
I'm having an issue with the predictor being deleted upon AddRef/Release when the RunnableMethods are ...
9 years, 5 months ago (2011-07-21 06:12:10 UTC) #1
willchan no longer on Chromium
Getting this in by Monday is ambitious :P http://codereview.chromium.org/7467012/diff/1065/chrome/browser/io_thread.cc File chrome/browser/io_thread.cc (right): http://codereview.chromium.org/7467012/diff/1065/chrome/browser/io_thread.cc#newcode598 chrome/browser/io_thread.cc:598: Profile* ...
9 years, 5 months ago (2011-07-21 12:10:53 UTC) #2
Miranda Callahan
Thanks for this huge CL! A couple nits in the Profile code, and then I ...
9 years, 5 months ago (2011-07-21 14:38:04 UTC) #3
rpetterson
I've addressed all the comments thus far. PTAL. Also, I'm running into an issue where ...
9 years, 4 months ago (2011-08-10 02:24:46 UTC) #4
rpetterson
Please ignore the previous question about the deref'ing. I realized the error and have uploaded ...
9 years, 4 months ago (2011-08-10 03:43:38 UTC) #5
willchan no longer on Chromium
I need to go through this with a fine toothed comb, but generally speaking this ...
9 years, 4 months ago (2011-08-10 07:04:08 UTC) #6
Miranda Callahan
I'm turning this review entirely over to willchan, as this is his area of expertise ...
9 years, 4 months ago (2011-08-10 07:58:39 UTC) #7
willchan no longer on Chromium
http://codereview.chromium.org/7467012/diff/32011/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): http://codereview.chromium.org/7467012/diff/32011/chrome/browser/browser_process_impl.cc#newcode39 chrome/browser/browser_process_impl.cc:39: #include "chrome/browser/net/predictor.h" Is this needed at all? I don't ...
9 years, 4 months ago (2011-08-10 16:10:34 UTC) #8
rpetterson
Okay, hit all the comments. PTAL. I'm still having an issue with the ProfileManagerTest. I've ...
9 years, 4 months ago (2011-08-12 03:12:36 UTC) #9
willchan no longer on Chromium
http://codereview.chromium.org/7467012/diff/41004/chrome/browser/net/connect_interceptor.cc File chrome/browser/net/connect_interceptor.cc (right): http://codereview.chromium.org/7467012/diff/41004/chrome/browser/net/connect_interceptor.cc#newcode60 chrome/browser/net/connect_interceptor.cc:60: request_scheme_host); indent is off http://codereview.chromium.org/7467012/diff/41004/chrome/browser/net/connect_interceptor.cc#newcode70 chrome/browser/net/connect_interceptor.cc:70: request_scheme_host); indent is ...
9 years, 4 months ago (2011-08-12 21:17:29 UTC) #10
willchan no longer on Chromium
On 2011/08/12 03:12:36, rpetterson wrote: > Okay, hit all the comments. PTAL. > > I'm ...
9 years, 4 months ago (2011-08-12 21:19:21 UTC) #11
willchan no longer on Chromium
http://codereview.chromium.org/7467012/diff/41004/chrome/browser/autocomplete/autocomplete_edit.cc File chrome/browser/autocomplete/autocomplete_edit.cc (right): http://codereview.chromium.org/7467012/diff/41004/chrome/browser/autocomplete/autocomplete_edit.cc#newcode856 chrome/browser/autocomplete/autocomplete_edit.cc:856: if (profile_->GetNetworkPredictor()) Nit: please use braces for multiline if ...
9 years, 4 months ago (2011-08-12 21:51:46 UTC) #12
rpetterson
http://codereview.chromium.org/7467012/diff/41004/chrome/browser/autocomplete/autocomplete_edit.cc File chrome/browser/autocomplete/autocomplete_edit.cc (right): http://codereview.chromium.org/7467012/diff/41004/chrome/browser/autocomplete/autocomplete_edit.cc#newcode856 chrome/browser/autocomplete/autocomplete_edit.cc:856: if (profile_->GetNetworkPredictor()) On 2011/08/12 21:51:47, willchan wrote: > Nit: ...
9 years, 4 months ago (2011-08-13 00:55:17 UTC) #13
willchan no longer on Chromium
I think we're pretty close now! There's just the issue of the profile_manager_unittest.cc. http://codereview.chromium.org/7467012/diff/43052/chrome/browser/browser_about_handler.cc File ...
9 years, 4 months ago (2011-08-16 00:16:51 UTC) #14
jar (doing other things)
The flow and trust we're putting in the Unretained bind probably needs to be documented. ...
9 years, 4 months ago (2011-08-16 01:19:09 UTC) #15
willchan no longer on Chromium
http://codereview.chromium.org/7467012/diff/32011/chrome/browser/browser_main.cc File chrome/browser/browser_main.cc (left): http://codereview.chromium.org/7467012/diff/32011/chrome/browser/browser_main.cc#oldcode1861 chrome/browser/browser_main.cc:1861: chrome_browser_net::PredictorInit dns_prefetch( On 2011/08/16 01:19:09, jar wrote: > This ...
9 years, 4 months ago (2011-08-16 01:42:57 UTC) #16
rpetterson
@jar: I think @willchan responded to many of your concerns. I've also added my thoughts ...
9 years, 4 months ago (2011-08-16 03:52:10 UTC) #17
Miranda Callahan
On 2011/08/16 03:52:10, rpetterson wrote: > @jar: I think @willchan responded to many of your ...
9 years, 4 months ago (2011-08-16 08:23:37 UTC) #18
jar (doing other things)
comments directed to Will about the change from using method factories to using base::Unretained() http://codereview.chromium.org/7467012/diff/32011/chrome/browser/net/predictor.h ...
9 years, 4 months ago (2011-08-16 18:45:22 UTC) #19
willchan no longer on Chromium
http://codereview.chromium.org/7467012/diff/32011/chrome/browser/net/predictor.h File chrome/browser/net/predictor.h (right): http://codereview.chromium.org/7467012/diff/32011/chrome/browser/net/predictor.h#newcode60 chrome/browser/net/predictor.h:60: class Predictor : public base::RefCountedThreadSafe<Predictor> { On 2011/08/16 18:45:22, ...
9 years, 4 months ago (2011-08-16 19:02:49 UTC) #20
willchan no longer on Chromium
LGTM, but wait for jar to sign off on predictor stuff, and mirandac to sign ...
9 years, 4 months ago (2011-08-16 22:14:48 UTC) #21
rpetterson
Should be passing all tests. Got around the ProfileManagerTest situation by creating a SimpleShutdownPredictor that ...
9 years, 4 months ago (2011-08-17 05:43:38 UTC) #22
Miranda Callahan
On 2011/08/17 05:43:38, rpetterson wrote: > Should be passing all tests. Got around the ProfileManagerTest ...
9 years, 4 months ago (2011-08-17 08:45:36 UTC) #23
Miranda Callahan
http://codereview.chromium.org/7467012/diff/58004/chrome/browser/profiles/profile_impl.cc File chrome/browser/profiles/profile_impl.cc (right): http://codereview.chromium.org/7467012/diff/58004/chrome/browser/profiles/profile_impl.cc#newcode323 chrome/browser/profiles/profile_impl.cc:323: g_browser_process->profile_manager() == NULL); nit: can you add a comment ...
9 years, 4 months ago (2011-08-17 08:45:56 UTC) #24
rpetterson
FYI, I pulled the delete of predictor_api.{h,cc} out of this CL and will submit it ...
9 years, 4 months ago (2011-08-17 16:28:24 UTC) #25
jar (doing other things)
LGTM
9 years, 4 months ago (2011-08-17 18:37:56 UTC) #26
commit-bot: I haz the power
Change committed as 97446
9 years, 4 months ago (2011-08-19 09:36:20 UTC) #27
commit-bot: I haz the power
Can't apply patch for file chrome/browser/browser_main.cc. While running patch -p0 --forward --force; patching file chrome/browser/browser_main.cc ...
9 years, 3 months ago (2011-09-08 20:03:28 UTC) #28
commit-bot: I haz the power
Can't apply patch for file chrome/browser/browser_main.cc. While running patch -p0 --forward --force; patching file chrome/browser/browser_main.cc ...
9 years, 3 months ago (2011-09-09 03:40:10 UTC) #29
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test. Builder is ...
9 years, 3 months ago (2011-09-09 15:52:20 UTC) #30
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test. Builder is ...
9 years, 3 months ago (2011-09-09 20:16:15 UTC) #31
commit-bot: I haz the power
Change committed as 100555
9 years, 3 months ago (2011-09-10 01:30:49 UTC) #32
TVL
http://codereview.chromium.org/7467012/diff/105007/chrome/browser/profiles/profile.h File chrome/browser/profiles/profile.h (right): http://codereview.chromium.org/7467012/diff/105007/chrome/browser/profiles/profile.h#newcode550 chrome/browser/profiles/profile.h:550: virtual chrome_browser_net::Predictor* GetNetworkPredictor(); why is this not a pure ...
9 years, 3 months ago (2011-09-13 19:07:50 UTC) #33
willchan no longer on Chromium
http://codereview.chromium.org/7467012/diff/105007/chrome/browser/profiles/profile.h File chrome/browser/profiles/profile.h (right): http://codereview.chromium.org/7467012/diff/105007/chrome/browser/profiles/profile.h#newcode550 chrome/browser/profiles/profile.h:550: virtual chrome_browser_net::Predictor* GetNetworkPredictor(); On 2011/09/13 19:07:51, TVL wrote: > ...
9 years, 3 months ago (2011-09-13 19:12:46 UTC) #34
rpetterson
http://codereview.chromium.org/7467012/diff/105007/chrome/browser/profiles/profile.h File chrome/browser/profiles/profile.h (right): http://codereview.chromium.org/7467012/diff/105007/chrome/browser/profiles/profile.h#newcode550 chrome/browser/profiles/profile.h:550: virtual chrome_browser_net::Predictor* GetNetworkPredictor(); On 2011/09/13 19:12:47, willchan wrote: > ...
9 years, 3 months ago (2011-09-13 19:39:10 UTC) #35
willchan no longer on Chromium
9 years, 3 months ago (2011-09-13 19:52:05 UTC) #36
On Tue, Sep 13, 2011 at 12:39 PM,  <rlp@chromium.org> wrote:
>
>
http://codereview.chromium.org/7467012/diff/105007/chrome/browser/profiles/pr...
> File chrome/browser/profiles/profile.h (right):
>
>
http://codereview.chromium.org/7467012/diff/105007/chrome/browser/profiles/pr...
> chrome/browser/profiles/profile.h:550: virtual
> chrome_browser_net::Predictor* GetNetworkPredictor();
> On 2011/09/13 19:12:47, willchan wrote:
>>
>> On 2011/09/13 19:07:51, TVL wrote:
>> > why is this not a pure virtual?  And why is an implementation
>
> provide in
>>
>> > profile.cc, profile.cc should only have static and non virtual
>
> methods.
>
>> Woops, I missed that in the review. That's absolutely correct.
>
> This restriction wasn't clear to me. @TVL, I'll send you a CL with the
> fix shortly.

Don't worry, not your fault. My fault for not catching as a reviewer.
Thanks to TVL for pointing this out. Please add me as a OWNERS
reviewer.

>
> http://codereview.chromium.org/7467012/
>

Powered by Google App Engine
This is Rietveld 408576698