diff options
Diffstat (limited to 'chrome/browser/profiles/profile_io_data.cc')
-rw-r--r-- | chrome/browser/profiles/profile_io_data.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc index ca6c90b..1556ad8 100644 --- a/chrome/browser/profiles/profile_io_data.cc +++ b/chrome/browser/profiles/profile_io_data.cc @@ -15,6 +15,7 @@ #include "base/stl_util.h" #include "base/string_number_conversions.h" #include "base/string_util.h" +#include "base/stringprintf.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/cookie_settings.h" #include "chrome/browser/content_settings/host_content_settings_map.h" @@ -396,6 +397,17 @@ content::MediaObserver* ProfileIOData::ResourceContext::GetMediaObserver() { return media_observer_; } +// static +std::string ProfileIOData::GetSSLSessionCacheShard() { + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + // The SSL session cache is partitioned by setting a string. This returns a + // unique string to partition the SSL session cache. Each time we create a + // new profile, we'll get a fresh SSL session cache which is separate from + // the other profiles. + static unsigned ssl_session_cache_instance = 0; + return StringPrintf("profile/%u", ssl_session_cache_instance++); +} + void ProfileIOData::LazyInitialize() const { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); if (initialized_) |