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

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

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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) 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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 } 599 }
600 600
601 // static 601 // static
602 std::string ProfileIOData::GetSSLSessionCacheShard() { 602 std::string ProfileIOData::GetSSLSessionCacheShard() {
603 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 603 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
604 // The SSL session cache is partitioned by setting a string. This returns a 604 // The SSL session cache is partitioned by setting a string. This returns a
605 // unique string to partition the SSL session cache. Each time we create a 605 // unique string to partition the SSL session cache. Each time we create a
606 // new profile, we'll get a fresh SSL session cache which is separate from 606 // new profile, we'll get a fresh SSL session cache which is separate from
607 // the other profiles. 607 // the other profiles.
608 static unsigned ssl_session_cache_instance = 0; 608 static unsigned ssl_session_cache_instance = 0;
609 return StringPrintf("profile/%u", ssl_session_cache_instance++); 609 return base::StringPrintf("profile/%u", ssl_session_cache_instance++);
610 } 610 }
611 611
612 void ProfileIOData::Init(content::ProtocolHandlerMap* protocol_handlers) const { 612 void ProfileIOData::Init(content::ProtocolHandlerMap* protocol_handlers) const {
613 // The basic logic is implemented here. The specific initialization 613 // The basic logic is implemented here. The specific initialization
614 // is done in InitializeInternal(), implemented by subtypes. Static helper 614 // is done in InitializeInternal(), implemented by subtypes. Static helper
615 // functions have been provided to assist in common operations. 615 // functions have been provided to assist in common operations.
616 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 616 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
617 DCHECK(!initialized_); 617 DCHECK(!initialized_);
618 618
619 startup_metric_utils::ScopedSlowStartupUMA 619 startup_metric_utils::ScopedSlowStartupUMA
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 void ProfileIOData::SetCookieSettingsForTesting( 836 void ProfileIOData::SetCookieSettingsForTesting(
837 CookieSettings* cookie_settings) { 837 CookieSettings* cookie_settings) {
838 DCHECK(!cookie_settings_.get()); 838 DCHECK(!cookie_settings_.get());
839 cookie_settings_ = cookie_settings; 839 cookie_settings_ = cookie_settings;
840 } 840 }
841 841
842 void ProfileIOData::set_signin_names_for_testing( 842 void ProfileIOData::set_signin_names_for_testing(
843 SigninNamesOnIOThread* signin_names) { 843 SigninNamesOnIOThread* signin_names) {
844 signin_names_.reset(signin_names); 844 signin_names_.reset(signin_names);
845 } 845 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698