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

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 10735042: Revert 145969 - Removing last usage of default request context. Fixing up login_utils to not need i… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/common/chrome_notification_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_impl_io_data.h" 5 #include "chrome/browser/profiles/profile_impl_io_data.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/stl_util.h" 11 #include "base/stl_util.h"
12 #include "base/threading/worker_pool.h" 12 #include "base/threading/worker_pool.h"
13 #include "chrome/browser/io_thread.h" 13 #include "chrome/browser/io_thread.h"
14 #include "chrome/browser/net/chrome_net_log.h" 14 #include "chrome/browser/net/chrome_net_log.h"
15 #include "chrome/browser/net/chrome_network_delegate.h" 15 #include "chrome/browser/net/chrome_network_delegate.h"
16 #include "chrome/browser/net/clear_on_exit_policy.h" 16 #include "chrome/browser/net/clear_on_exit_policy.h"
17 #include "chrome/browser/net/connect_interceptor.h" 17 #include "chrome/browser/net/connect_interceptor.h"
18 #include "chrome/browser/net/http_server_properties_manager.h" 18 #include "chrome/browser/net/http_server_properties_manager.h"
19 #include "chrome/browser/net/predictor.h" 19 #include "chrome/browser/net/predictor.h"
20 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" 20 #include "chrome/browser/net/sqlite_persistent_cookie_store.h"
21 #include "chrome/browser/net/sqlite_server_bound_cert_store.h" 21 #include "chrome/browser/net/sqlite_server_bound_cert_store.h"
22 #include "chrome/browser/prefs/pref_member.h" 22 #include "chrome/browser/prefs/pref_member.h"
23 #include "chrome/browser/profiles/profile.h" 23 #include "chrome/browser/profiles/profile.h"
24 #include "chrome/common/chrome_constants.h" 24 #include "chrome/common/chrome_constants.h"
25 #include "chrome/common/chrome_notification_types.h"
26 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
27 #include "chrome/common/pref_names.h" 26 #include "chrome/common/pref_names.h"
28 #include "chrome/common/url_constants.h" 27 #include "chrome/common/url_constants.h"
29 #include "content/public/browser/browser_thread.h" 28 #include "content/public/browser/browser_thread.h"
30 #include "content/public/browser/notification_service.h"
31 #include "content/public/browser/resource_context.h" 29 #include "content/public/browser/resource_context.h"
32 #include "net/base/server_bound_cert_service.h" 30 #include "net/base/server_bound_cert_service.h"
33 #include "net/ftp/ftp_network_layer.h" 31 #include "net/ftp/ftp_network_layer.h"
34 #include "net/http/http_cache.h" 32 #include "net/http/http_cache.h"
35 #include "net/url_request/url_request_job_factory.h" 33 #include "net/url_request/url_request_job_factory.h"
36 #include "webkit/quota/special_storage_policy.h" 34 #include "webkit/quota/special_storage_policy.h"
37 35
38 using content::BrowserThread; 36 using content::BrowserThread;
39 37
40 ProfileImplIOData::Handle::Handle(Profile* profile) 38 ProfileImplIOData::Handle::Handle(Profile* profile)
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 147 }
150 148
151 scoped_refptr<ChromeURLRequestContextGetter> 149 scoped_refptr<ChromeURLRequestContextGetter>
152 ProfileImplIOData::Handle::GetMainRequestContextGetter() const { 150 ProfileImplIOData::Handle::GetMainRequestContextGetter() const {
153 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 151 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
154 LazyInitialize(); 152 LazyInitialize();
155 if (!main_request_context_getter_) { 153 if (!main_request_context_getter_) {
156 main_request_context_getter_ = 154 main_request_context_getter_ =
157 ChromeURLRequestContextGetter::CreateOriginal( 155 ChromeURLRequestContextGetter::CreateOriginal(
158 profile_, io_data_); 156 profile_, io_data_);
159
160 content::NotificationService::current()->Notify(
161 chrome::NOTIFICATION_PROFILE_URL_REQUEST_CONTEXT_GETTER_INITIALIZED,
162 content::Source<Profile>(profile_),
163 content::NotificationService::NoDetails());
164 } 157 }
165 return main_request_context_getter_; 158 return main_request_context_getter_;
166 } 159 }
167 160
168 scoped_refptr<ChromeURLRequestContextGetter> 161 scoped_refptr<ChromeURLRequestContextGetter>
169 ProfileImplIOData::Handle::GetMediaRequestContextGetter() const { 162 ProfileImplIOData::Handle::GetMediaRequestContextGetter() const {
170 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 163 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
171 LazyInitialize(); 164 LazyInitialize();
172 if (!media_request_context_getter_) { 165 if (!media_request_context_getter_) {
173 media_request_context_getter_ = 166 media_request_context_getter_ =
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( 543 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread(
551 base::Time time) { 544 base::Time time) {
552 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 545 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
553 LazyInitialize(); 546 LazyInitialize();
554 547
555 DCHECK(transport_security_state()); 548 DCHECK(transport_security_state());
556 transport_security_state()->DeleteSince(time); 549 transport_security_state()->DeleteSince(time);
557 DCHECK(http_server_properties_manager()); 550 DCHECK(http_server_properties_manager());
558 http_server_properties_manager()->Clear(); 551 http_server_properties_manager()->Clear();
559 } 552 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/common/chrome_notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698