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

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

Issue 10108026: Transmit a X-Chrome-UMA-Enabled bit to Google domains from clients that have UMA enabled. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove mutable Created 8 years, 7 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
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_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/bind.h" 10 #include "base/bind.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 #endif 255 #endif
256 profile(NULL) { 256 profile(NULL) {
257 } 257 }
258 258
259 ProfileIOData::ProfileParams::~ProfileParams() {} 259 ProfileIOData::ProfileParams::~ProfileParams() {}
260 260
261 ProfileIOData::ProfileIOData(bool is_incognito) 261 ProfileIOData::ProfileIOData(bool is_incognito)
262 : initialized_(false), 262 : initialized_(false),
263 ALLOW_THIS_IN_INITIALIZER_LIST( 263 ALLOW_THIS_IN_INITIALIZER_LIST(
264 resource_context_(new ResourceContext(this))), 264 resource_context_(new ResourceContext(this))),
265 initialized_on_UI_thread_(false) { 265 initialized_on_UI_thread_(false),
266 is_incognito_(is_incognito) {
266 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 267 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
267 } 268 }
268 269
269 ProfileIOData::~ProfileIOData() { 270 ProfileIOData::~ProfileIOData() {
270 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) 271 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO))
271 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 272 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
272 273
273 if (main_request_context_) 274 if (main_request_context_)
274 main_request_context_->AssertNoURLRequests(); 275 main_request_context_->AssertNoURLRequests();
275 if (extensions_request_context_) 276 if (extensions_request_context_)
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 context->set_is_incognito(profile_params_->is_incognito); 519 context->set_is_incognito(profile_params_->is_incognito);
519 context->set_accept_language(profile_params_->accept_language); 520 context->set_accept_language(profile_params_->accept_language);
520 context->set_accept_charset(profile_params_->accept_charset); 521 context->set_accept_charset(profile_params_->accept_charset);
521 context->set_referrer_charset(profile_params_->referrer_charset); 522 context->set_referrer_charset(profile_params_->referrer_charset);
522 context->set_ssl_config_service(profile_params_->ssl_config_service); 523 context->set_ssl_config_service(profile_params_->ssl_config_service);
523 } 524 }
524 525
525 void ProfileIOData::ShutdownOnUIThread() { 526 void ProfileIOData::ShutdownOnUIThread() {
526 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 527 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
527 enable_referrers_.Destroy(); 528 enable_referrers_.Destroy();
529 enable_metrics_.Destroy();
528 clear_local_state_on_exit_.Destroy(); 530 clear_local_state_on_exit_.Destroy();
529 safe_browsing_enabled_.Destroy(); 531 safe_browsing_enabled_.Destroy();
530 session_startup_pref_.Destroy(); 532 session_startup_pref_.Destroy();
531 #if defined(ENABLE_CONFIGURATION_POLICY) 533 #if defined(ENABLE_CONFIGURATION_POLICY)
532 if (url_blacklist_manager_.get()) 534 if (url_blacklist_manager_.get())
533 url_blacklist_manager_->ShutdownOnUIThread(); 535 url_blacklist_manager_->ShutdownOnUIThread();
534 #endif 536 #endif
535 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); 537 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this);
536 if (!posted) 538 if (!posted)
537 delete this; 539 delete this;
538 } 540 }
539 541
540 void ProfileIOData::set_server_bound_cert_service( 542 void ProfileIOData::set_server_bound_cert_service(
541 net::ServerBoundCertService* server_bound_cert_service) const { 543 net::ServerBoundCertService* server_bound_cert_service) const {
542 server_bound_cert_service_.reset(server_bound_cert_service); 544 server_bound_cert_service_.reset(server_bound_cert_service);
543 } 545 }
544 546
545 void ProfileIOData::DestroyResourceContext() { 547 void ProfileIOData::DestroyResourceContext() {
546 resource_context_.reset(); 548 resource_context_.reset();
547 } 549 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698