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

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

Issue 7346024: Get rid of the ProfileId. It was added for ceee. I reverted the original change, since it led to ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 DesktopNotificationServiceFactory::GetForProfile(profile); 254 DesktopNotificationServiceFactory::GetForProfile(profile);
255 prerender::PrerenderManager* prerender_manager = 255 prerender::PrerenderManager* prerender_manager =
256 profile->GetPrerenderManager(); 256 profile->GetPrerenderManager();
257 if (prerender_manager) 257 if (prerender_manager)
258 params->prerender_manager = prerender_manager->AsWeakPtr(); 258 params->prerender_manager = prerender_manager->AsWeakPtr();
259 params->protocol_handler_registry = profile->GetProtocolHandlerRegistry(); 259 params->protocol_handler_registry = profile->GetProtocolHandlerRegistry();
260 260
261 params->proxy_config_service.reset( 261 params->proxy_config_service.reset(
262 ProxyServiceFactory::CreateProxyConfigService( 262 ProxyServiceFactory::CreateProxyConfigService(
263 profile->GetProxyConfigTracker())); 263 profile->GetProxyConfigTracker()));
264 params->profile_id = profile->GetRuntimeId(); 264 params->profile = profile;
265 profile_params_.reset(params.release()); 265 profile_params_.reset(params.release());
266 } 266 }
267 267
268 ProfileIOData::RequestContext::RequestContext() {} 268 ProfileIOData::RequestContext::RequestContext() {}
269 ProfileIOData::RequestContext::~RequestContext() {} 269 ProfileIOData::RequestContext::~RequestContext() {}
270 270
271 ProfileIOData::ProfileParams::ProfileParams() 271 ProfileIOData::ProfileParams::ProfileParams()
272 : is_incognito(false), 272 : is_incognito(false),
273 clear_local_state_on_exit(false), 273 clear_local_state_on_exit(false),
274 io_thread(NULL), 274 io_thread(NULL),
275 notification_service(NULL), 275 notification_service(NULL),
276 profile_id(Profile::kInvalidProfileId) {} 276 profile(NULL) {}
277 ProfileIOData::ProfileParams::~ProfileParams() {} 277 ProfileIOData::ProfileParams::~ProfileParams() {}
278 278
279 ProfileIOData::ProfileIOData(bool is_incognito) 279 ProfileIOData::ProfileIOData(bool is_incognito)
280 : initialized_(false), 280 : initialized_(false),
281 ALLOW_THIS_IN_INITIALIZER_LIST(resource_context_(this)) { 281 ALLOW_THIS_IN_INITIALIZER_LIST(resource_context_(this)) {
282 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 282 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
283 } 283 }
284 284
285 ProfileIOData::~ProfileIOData() { 285 ProfileIOData::~ProfileIOData() {
286 // If we have never initialized ProfileIOData, then Handle may hold the only 286 // If we have never initialized ProfileIOData, then Handle may hold the only
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 extensions_request_context_ = new RequestContext; 403 extensions_request_context_ = new RequestContext;
404 weak_extensions_request_context_ = extensions_request_context_->GetWeakPtr(); 404 weak_extensions_request_context_ = extensions_request_context_->GetWeakPtr();
405 405
406 profile_params_->appcache_service->set_request_context(main_request_context_); 406 profile_params_->appcache_service->set_request_context(main_request_context_);
407 407
408 chrome_url_data_manager_backend_.reset(new ChromeURLDataManagerBackend); 408 chrome_url_data_manager_backend_.reset(new ChromeURLDataManagerBackend);
409 409
410 network_delegate_.reset(new ChromeNetworkDelegate( 410 network_delegate_.reset(new ChromeNetworkDelegate(
411 io_thread_globals->extension_event_router_forwarder.get(), 411 io_thread_globals->extension_event_router_forwarder.get(),
412 profile_params_->extension_info_map, 412 profile_params_->extension_info_map,
413 profile_params_->profile_id, 413 profile_params_->profile,
414 &enable_referrers_)); 414 &enable_referrers_));
415 415
416 dns_cert_checker_.reset( 416 dns_cert_checker_.reset(
417 CreateDnsCertProvenanceChecker(io_thread_globals->dnsrr_resolver.get(), 417 CreateDnsCertProvenanceChecker(io_thread_globals->dnsrr_resolver.get(),
418 main_request_context_)); 418 main_request_context_));
419 419
420 proxy_service_.reset( 420 proxy_service_.reset(
421 ProxyServiceFactory::CreateProxyService( 421 ProxyServiceFactory::CreateProxyService(
422 io_thread->net_log(), 422 io_thread->net_log(),
423 io_thread_globals->proxy_script_fetcher_context.get(), 423 io_thread_globals->proxy_script_fetcher_context.get(),
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 context->set_blob_storage_context(profile_params_->blob_storage_context); 511 context->set_blob_storage_context(profile_params_->blob_storage_context);
512 context->set_file_system_context(profile_params_->file_system_context); 512 context->set_file_system_context(profile_params_->file_system_context);
513 context->set_extension_info_map(profile_params_->extension_info_map); 513 context->set_extension_info_map(profile_params_->extension_info_map);
514 } 514 }
515 515
516 void ProfileIOData::ShutdownOnUIThread() { 516 void ProfileIOData::ShutdownOnUIThread() {
517 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 517 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
518 enable_referrers_.Destroy(); 518 enable_referrers_.Destroy();
519 clear_local_state_on_exit_.Destroy(); 519 clear_local_state_on_exit_.Destroy();
520 } 520 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698