Commit 5a93a1b8 authored by Henrique Nakashima's avatar Henrique Nakashima Committed by Commit Bot

Each Profile owns its own SimpleFactoryKey.

Bug: 933784
Change-Id: I3bc03760dea254fa33f8c660689739db65a1ce9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1492791
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: default avatarXi Han <hanxi@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638295}
parent 8b2dca42
...@@ -65,7 +65,7 @@ jlong JNI_CachedImageFetcherBridge_Init( ...@@ -65,7 +65,7 @@ jlong JNI_CachedImageFetcherBridge_Init(
JNIEnv* j_env, JNIEnv* j_env,
const JavaParamRef<jobject>& j_profile) { const JavaParamRef<jobject>& j_profile) {
Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile); Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile);
SimpleFactoryKey* simple_factory_key = Profile::GetSimpleFactoryKey(profile); SimpleFactoryKey* simple_factory_key = profile->GetSimpleFactoryKey();
base::FilePath file_path = base::FilePath file_path =
CachedImageFetcherServiceFactory::GetCachePath(simple_factory_key) CachedImageFetcherServiceFactory::GetCachePath(simple_factory_key)
.Append(kPathPostfix); .Append(kPathPostfix);
......
...@@ -49,10 +49,9 @@ JNI_EXPORT void JNI_PrefetchTestBridge_InsertIntoCachedImageFetcher( ...@@ -49,10 +49,9 @@ JNI_EXPORT void JNI_PrefetchTestBridge_InsertIntoCachedImageFetcher(
const JavaParamRef<jbyteArray>& j_image_data) { const JavaParamRef<jbyteArray>& j_image_data) {
Profile* profile = ProfileManager::GetLastUsedProfile(); Profile* profile = ProfileManager::GetLastUsedProfile();
DCHECK(profile); DCHECK(profile);
SimpleFactoryKey* simple_factory_key = Profile::GetSimpleFactoryKey(profile);
image_fetcher::CachedImageFetcherService* service = image_fetcher::CachedImageFetcherService* service =
image_fetcher::CachedImageFetcherServiceFactory::GetForKey( image_fetcher::CachedImageFetcherServiceFactory::GetForKey(
simple_factory_key, profile->GetPrefs()); profile->GetSimpleFactoryKey(), profile->GetPrefs());
DCHECK(service); DCHECK(service);
scoped_refptr<image_fetcher::ImageCache> cache = scoped_refptr<image_fetcher::ImageCache> cache =
service->ImageCacheForTesting(); service->ImageCacheForTesting();
......
...@@ -106,8 +106,7 @@ KeyedService* PrefetchServiceFactory::BuildServiceInstanceFor( ...@@ -106,8 +106,7 @@ KeyedService* PrefetchServiceFactory::BuildServiceInstanceFor(
suggested_articles_observer = std::make_unique<SuggestedArticlesObserver>(); suggested_articles_observer = std::make_unique<SuggestedArticlesObserver>();
thumbnail_fetcher = std::make_unique<ThumbnailFetcherImpl>(); thumbnail_fetcher = std::make_unique<ThumbnailFetcherImpl>();
} else { } else {
SimpleFactoryKey* simple_factory_key = SimpleFactoryKey* simple_factory_key = profile->GetSimpleFactoryKey();
Profile::GetSimpleFactoryKey(profile);
image_fetcher::CachedImageFetcherService* image_fetcher_service = image_fetcher::CachedImageFetcherService* image_fetcher_service =
image_fetcher::CachedImageFetcherServiceFactory::GetForKey( image_fetcher::CachedImageFetcherServiceFactory::GetForKey(
simple_factory_key, profile->GetPrefs()); simple_factory_key, profile->GetPrefs());
......
...@@ -137,7 +137,11 @@ void NotifyOTRProfileDestroyedOnIOThread(void* original_profile, ...@@ -137,7 +137,11 @@ void NotifyOTRProfileDestroyedOnIOThread(void* original_profile,
} // namespace } // namespace
OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile) OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile)
: profile_(real_profile), start_time_(base::Time::Now()) { : profile_(real_profile),
start_time_(base::Time::Now()),
key_(
std::make_unique<SimpleFactoryKey>(profile_->GetPath(),
profile_->GetSimpleFactoryKey())) {
// Must happen before we ask for prefs as prefs needs the connection to the // Must happen before we ask for prefs as prefs needs the connection to the
// service manager, which is set up in Initialize. // service manager, which is set up in Initialize.
BrowserContext::Initialize(this, profile_->GetPath()); BrowserContext::Initialize(this, profile_->GetPath());
...@@ -148,7 +152,6 @@ OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile) ...@@ -148,7 +152,6 @@ OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile)
->CreateDelegate()); ->CreateDelegate());
// Register on BrowserContext. // Register on BrowserContext.
user_prefs::UserPrefs::Set(this, prefs_.get()); user_prefs::UserPrefs::Set(this, prefs_.get());
off_the_record_key_ = profile_->GetOffTheRecordKey();
} }
void OffTheRecordProfileImpl::Init() { void OffTheRecordProfileImpl::Init() {
...@@ -228,7 +231,7 @@ OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { ...@@ -228,7 +231,7 @@ OffTheRecordProfileImpl::~OffTheRecordProfileImpl() {
// in the BrowserContextDependencyManager's dependency graph can depend on the // in the BrowserContextDependencyManager's dependency graph can depend on the
// ones in the SimpleDependencyManager's graph. // ones in the SimpleDependencyManager's graph.
SimpleDependencyManager::GetInstance()->DestroyKeyedServices( SimpleDependencyManager::GetInstance()->DestroyKeyedServices(
GetOffTheRecordKey()); GetSimpleFactoryKey());
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
base::PostTaskWithTraits( base::PostTaskWithTraits(
...@@ -549,12 +552,9 @@ base::Time OffTheRecordProfileImpl::GetStartTime() const { ...@@ -549,12 +552,9 @@ base::Time OffTheRecordProfileImpl::GetStartTime() const {
return start_time_; return start_time_;
} }
SimpleFactoryKey* OffTheRecordProfileImpl::GetOriginalKey() const { SimpleFactoryKey* OffTheRecordProfileImpl::GetSimpleFactoryKey() const {
return off_the_record_key_->original_key(); DCHECK(key_);
} return key_.get();
SimpleFactoryKey* OffTheRecordProfileImpl::GetOffTheRecordKey() const {
return off_the_record_key_;
} }
void OffTheRecordProfileImpl::SetExitType(ExitType exit_type) { void OffTheRecordProfileImpl::SetExitType(ExitType exit_type) {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ #ifndef CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_
#define CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ #define CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_
#include <memory>
#include <string> #include <string>
#include "base/macros.h" #include "base/macros.h"
...@@ -77,8 +78,7 @@ class OffTheRecordProfileImpl : public Profile { ...@@ -77,8 +78,7 @@ class OffTheRecordProfileImpl : public Profile {
service_manager::mojom::ServiceRequest request) override; service_manager::mojom::ServiceRequest request) override;
bool IsSameProfile(Profile* profile) override; bool IsSameProfile(Profile* profile) override;
base::Time GetStartTime() const override; base::Time GetStartTime() const override;
SimpleFactoryKey* GetOriginalKey() const override; SimpleFactoryKey* GetSimpleFactoryKey() const override;
SimpleFactoryKey* GetOffTheRecordKey() const override;
base::FilePath last_selected_directory() override; base::FilePath last_selected_directory() override;
void set_last_selected_directory(const base::FilePath& path) override; void set_last_selected_directory(const base::FilePath& path) override;
bool WasCreatedByVersionOrLater(const std::string& version) override; bool WasCreatedByVersionOrLater(const std::string& version) override;
...@@ -154,9 +154,11 @@ class OffTheRecordProfileImpl : public Profile { ...@@ -154,9 +154,11 @@ class OffTheRecordProfileImpl : public Profile {
// Time we were started. // Time we were started.
base::Time start_time_; base::Time start_time_;
base::FilePath last_selected_directory_; // The key to index KeyedService instances created by
// SimpleKeyedServiceFactory.
std::unique_ptr<SimpleFactoryKey> key_;
SimpleFactoryKey* off_the_record_key_; base::FilePath last_selected_directory_;
DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl);
}; };
......
...@@ -115,13 +115,6 @@ Profile* Profile::FromWebUI(content::WebUI* web_ui) { ...@@ -115,13 +115,6 @@ Profile* Profile::FromWebUI(content::WebUI* web_ui) {
return FromBrowserContext(web_ui->GetWebContents()->GetBrowserContext()); return FromBrowserContext(web_ui->GetWebContents()->GetBrowserContext());
} }
// static
SimpleFactoryKey* Profile::GetSimpleFactoryKey(Profile* profile) {
if (profile->IsOffTheRecord())
return profile->GetOffTheRecordKey();
return profile->GetOriginalKey();
}
TestingProfile* Profile::AsTestingProfile() { TestingProfile* Profile::AsTestingProfile() {
return nullptr; return nullptr;
} }
......
...@@ -121,9 +121,6 @@ class Profile : public content::BrowserContext { ...@@ -121,9 +121,6 @@ class Profile : public content::BrowserContext {
// Returns the profile corresponding to the given WebUI. // Returns the profile corresponding to the given WebUI.
static Profile* FromWebUI(content::WebUI* web_ui); static Profile* FromWebUI(content::WebUI* web_ui);
// Returns the SimpleFactoryKey asscociated with this |profile|.
static SimpleFactoryKey* GetSimpleFactoryKey(Profile* profile);
// content::BrowserContext implementation ------------------------------------ // content::BrowserContext implementation ------------------------------------
// Typesafe upcast. // Typesafe upcast.
...@@ -225,12 +222,9 @@ class Profile : public content::BrowserContext { ...@@ -225,12 +222,9 @@ class Profile : public content::BrowserContext {
// the user started chrome. // the user started chrome.
virtual base::Time GetStartTime() const = 0; virtual base::Time GetStartTime() const = 0;
// Returns the key used by the original profile to index KeyedService // Returns the key used to index KeyedService instances created by a
// instances created by a SimpleKeyedServiceFactory. // SimpleKeyedServiceFactory.
virtual SimpleFactoryKey* GetOriginalKey() const = 0; virtual SimpleFactoryKey* GetSimpleFactoryKey() const = 0;
// Returns the key used by an incognito profile to index KeyedService
// instances created by a SimpleKeyedServiceFactory.
virtual SimpleFactoryKey* GetOffTheRecordKey() const = 0;
// Returns the last directory that was chosen for uploading or opening a file. // Returns the last directory that was chosen for uploading or opening a file.
virtual base::FilePath last_selected_directory() = 0; virtual base::FilePath last_selected_directory() = 0;
......
...@@ -468,6 +468,7 @@ ProfileImpl::ProfileImpl( ...@@ -468,6 +468,7 @@ ProfileImpl::ProfileImpl(
io_data_(this), io_data_(this),
last_session_exit_type_(EXIT_NORMAL), last_session_exit_type_(EXIT_NORMAL),
start_time_(base::Time::Now()), start_time_(base::Time::Now()),
key_(std::make_unique<SimpleFactoryKey>(GetPath())),
delegate_(delegate), delegate_(delegate),
reporting_permissions_checker_factory_(this), reporting_permissions_checker_factory_(this),
shared_cors_origin_access_list_( shared_cors_origin_access_list_(
...@@ -476,11 +477,8 @@ ProfileImpl::ProfileImpl( ...@@ -476,11 +477,8 @@ ProfileImpl::ProfileImpl(
DCHECK(!path.empty()) << "Using an empty path will attempt to write " DCHECK(!path.empty()) << "Using an empty path will attempt to write "
<< "profile files to the root directory!"; << "profile files to the root directory!";
// TODO(hanxi): get |key_| and |off_the_record_key_ |from the startup data if // TODO(hanxi): get |key_| from the startup data if it has already been
// they have been created when this profile is created. // created when this profile is created.
key_ = std::make_unique<SimpleFactoryKey>(GetPath());
off_the_record_key_ =
std::make_unique<SimpleFactoryKey>(GetPath(), key_.get());
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
if (!chromeos::ProfileHelper::IsSigninProfile(this) && if (!chromeos::ProfileHelper::IsSigninProfile(this) &&
...@@ -793,7 +791,7 @@ ProfileImpl::~ProfileImpl() { ...@@ -793,7 +791,7 @@ ProfileImpl::~ProfileImpl() {
// in the BrowserContextDependencyManager's dependency graph can depend on the // in the BrowserContextDependencyManager's dependency graph can depend on the
// ones in the SimpleDependencyManager's graph. // ones in the SimpleDependencyManager's graph.
SimpleDependencyManager::GetInstance()->DestroyKeyedServices( SimpleDependencyManager::GetInstance()->DestroyKeyedServices(
GetOriginalKey()); GetSimpleFactoryKey());
// This causes the Preferences file to be written to disk. // This causes the Preferences file to be written to disk.
if (prefs_loaded) if (prefs_loaded)
...@@ -838,14 +836,6 @@ bool ProfileImpl::IsOffTheRecord() const { ...@@ -838,14 +836,6 @@ bool ProfileImpl::IsOffTheRecord() const {
return false; return false;
} }
SimpleFactoryKey* ProfileImpl::GetOriginalKey() const {
return key_.get();
}
SimpleFactoryKey* ProfileImpl::GetOffTheRecordKey() const {
return off_the_record_key_.get();
}
Profile* ProfileImpl::GetOffTheRecordProfile() { Profile* ProfileImpl::GetOffTheRecordProfile() {
if (!off_the_record_profile_) { if (!off_the_record_profile_) {
std::unique_ptr<Profile> p(CreateOffTheRecordProfile()); std::unique_ptr<Profile> p(CreateOffTheRecordProfile());
...@@ -1341,6 +1331,11 @@ base::Time ProfileImpl::GetStartTime() const { ...@@ -1341,6 +1331,11 @@ base::Time ProfileImpl::GetStartTime() const {
return start_time_; return start_time_;
} }
SimpleFactoryKey* ProfileImpl::GetSimpleFactoryKey() const {
DCHECK(key_);
return key_.get();
}
#if BUILDFLAG(ENABLE_SESSION_SERVICE) #if BUILDFLAG(ENABLE_SESSION_SERVICE)
void ProfileImpl::StopCreateSessionServiceTimer() { void ProfileImpl::StopCreateSessionServiceTimer() {
create_session_service_timer_.Stop(); create_session_service_timer_.Stop();
......
...@@ -138,8 +138,6 @@ class ProfileImpl : public Profile { ...@@ -138,8 +138,6 @@ class ProfileImpl : public Profile {
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
ChromeZoomLevelPrefs* GetZoomLevelPrefs() override; ChromeZoomLevelPrefs* GetZoomLevelPrefs() override;
#endif #endif
SimpleFactoryKey* GetOriginalKey() const override;
SimpleFactoryKey* GetOffTheRecordKey() const override;
PrefService* GetOffTheRecordPrefs() override; PrefService* GetOffTheRecordPrefs() override;
PrefService* GetReadOnlyOffTheRecordPrefs() override; PrefService* GetReadOnlyOffTheRecordPrefs() override;
net::URLRequestContextGetter* GetRequestContext() override; net::URLRequestContextGetter* GetRequestContext() override;
...@@ -148,6 +146,7 @@ class ProfileImpl : public Profile { ...@@ -148,6 +146,7 @@ class ProfileImpl : public Profile {
scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override; scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override;
bool IsSameProfile(Profile* profile) override; bool IsSameProfile(Profile* profile) override;
base::Time GetStartTime() const override; base::Time GetStartTime() const override;
SimpleFactoryKey* GetSimpleFactoryKey() const override;
base::FilePath last_selected_directory() override; base::FilePath last_selected_directory() override;
void set_last_selected_directory(const base::FilePath& path) override; void set_last_selected_directory(const base::FilePath& path) override;
GURL GetHomePage() override; GURL GetHomePage() override;
...@@ -252,14 +251,13 @@ class ProfileImpl : public Profile { ...@@ -252,14 +251,13 @@ class ProfileImpl : public Profile {
std::unique_ptr<Profile> off_the_record_profile_; std::unique_ptr<Profile> off_the_record_profile_;
// The keys to index KeyedService instances created by
// SimpleKeyedServiceFactory.
std::unique_ptr<SimpleFactoryKey> key_;
std::unique_ptr<SimpleFactoryKey> off_the_record_key_;
// See GetStartTime for details. // See GetStartTime for details.
base::Time start_time_; base::Time start_time_;
// The key to index KeyedService instances created by
// SimpleKeyedServiceFactory.
std::unique_ptr<SimpleFactoryKey> key_;
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
std::unique_ptr<chromeos::Preferences> chromeos_preferences_; std::unique_ptr<chromeos::Preferences> chromeos_preferences_;
......
...@@ -307,10 +307,8 @@ TestingProfile::TestingProfile( ...@@ -307,10 +307,8 @@ TestingProfile::TestingProfile(
delegate_(delegate), delegate_(delegate),
profile_name_(profile_name), profile_name_(profile_name),
policy_service_(policy_service.release()) { policy_service_(policy_service.release()) {
if (parent) { if (parent)
parent->SetOffTheRecordProfile(std::unique_ptr<Profile>(this)); parent->SetOffTheRecordProfile(std::unique_ptr<Profile>(this));
off_the_record_key_ = parent->GetOffTheRecordKey();
}
// If no profile path was supplied, create one. // If no profile path was supplied, create one.
if (profile_path_.empty()) { if (profile_path_.empty()) {
...@@ -382,11 +380,12 @@ void TestingProfile::Init() { ...@@ -382,11 +380,12 @@ void TestingProfile::Init() {
profile_manager->GetSystemProfilePath()); profile_manager->GetSystemProfilePath());
} }
if (!IsOffTheRecord()) { if (IsOffTheRecord())
owned_key_ = std::make_unique<SimpleFactoryKey>(profile_path_); key_ = std::make_unique<SimpleFactoryKey>(
owned_off_the_record_key_ = original_profile_->GetPath(), original_profile_->GetSimpleFactoryKey());
std::make_unique<SimpleFactoryKey>(profile_path_, owned_key_.get()); else
} key_ = std::make_unique<SimpleFactoryKey>(profile_path_);
BrowserContext::Initialize(this, profile_path_); BrowserContext::Initialize(this, profile_path_);
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
...@@ -483,7 +482,7 @@ void TestingProfile::Init() { ...@@ -483,7 +482,7 @@ void TestingProfile::Init() {
// Prefs for incognito profiles are set in CreateIncognitoPrefService() by // Prefs for incognito profiles are set in CreateIncognitoPrefService() by
// simulating ProfileImpl::GetOffTheRecordPrefs(). // simulating ProfileImpl::GetOffTheRecordPrefs().
SimpleFactoryKey* key = Profile::GetSimpleFactoryKey(this); SimpleFactoryKey* key = GetSimpleFactoryKey();
if (!IsOffTheRecord()) { if (!IsOffTheRecord()) {
DCHECK(!original_profile_); DCHECK(!original_profile_);
user_prefs::PrefRegistrySyncable* pref_registry = user_prefs::PrefRegistrySyncable* pref_registry =
...@@ -532,9 +531,7 @@ TestingProfile::~TestingProfile() { ...@@ -532,9 +531,7 @@ TestingProfile::~TestingProfile() {
MaybeSendDestroyedNotification(); MaybeSendDestroyedNotification();
browser_context_dependency_manager_->DestroyBrowserContextServices(this); browser_context_dependency_manager_->DestroyBrowserContextServices(this);
simple_dependency_manager_->DestroyKeyedServices(GetSimpleFactoryKey());
SimpleFactoryKey* key = Profile::GetSimpleFactoryKey(this);
simple_dependency_manager_->DestroyKeyedServices(key);
if (host_content_settings_map_.get()) if (host_content_settings_map_.get())
host_content_settings_map_->ShutdownOnUIThread(); host_content_settings_map_->ShutdownOnUIThread();
...@@ -898,16 +895,9 @@ base::Time TestingProfile::GetStartTime() const { ...@@ -898,16 +895,9 @@ base::Time TestingProfile::GetStartTime() const {
return start_time_; return start_time_;
} }
SimpleFactoryKey* TestingProfile::GetOriginalKey() const { SimpleFactoryKey* TestingProfile::GetSimpleFactoryKey() const {
if (IsOffTheRecord()) DCHECK(key_);
return off_the_record_key_->original_key(); return key_.get();
return owned_key_.get();
}
SimpleFactoryKey* TestingProfile::GetOffTheRecordKey() const {
if (IsOffTheRecord())
return off_the_record_key_;
return owned_off_the_record_key_.get();
} }
base::FilePath TestingProfile::last_selected_directory() { base::FilePath TestingProfile::last_selected_directory() {
......
...@@ -324,8 +324,7 @@ class TestingProfile : public Profile { ...@@ -324,8 +324,7 @@ class TestingProfile : public Profile {
} }
bool IsSameProfile(Profile* profile) override; bool IsSameProfile(Profile* profile) override;
base::Time GetStartTime() const override; base::Time GetStartTime() const override;
SimpleFactoryKey* GetOriginalKey() const override; SimpleFactoryKey* GetSimpleFactoryKey() const override;
SimpleFactoryKey* GetOffTheRecordKey() const override;
base::FilePath last_selected_directory() override; base::FilePath last_selected_directory() override;
void set_last_selected_directory(const base::FilePath& path) override; void set_last_selected_directory(const base::FilePath& path) override;
bool WasCreatedByVersionOrLater(const std::string& version) override; bool WasCreatedByVersionOrLater(const std::string& version) override;
...@@ -369,6 +368,11 @@ class TestingProfile : public Profile { ...@@ -369,6 +368,11 @@ class TestingProfile : public Profile {
protected: protected:
base::Time start_time_; base::Time start_time_;
// The key to index KeyedService instances created by
// SimpleKeyedServiceFactory.
std::unique_ptr<SimpleFactoryKey> key_;
std::unique_ptr<sync_preferences::PrefServiceSyncable> prefs_; std::unique_ptr<sync_preferences::PrefServiceSyncable> prefs_;
// ref only for right type, lifecycle is managed by prefs_ // ref only for right type, lifecycle is managed by prefs_
sync_preferences::TestingPrefServiceSyncable* testing_prefs_; sync_preferences::TestingPrefServiceSyncable* testing_prefs_;
...@@ -460,14 +464,6 @@ class TestingProfile : public Profile { ...@@ -460,14 +464,6 @@ class TestingProfile : public Profile {
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
std::unique_ptr<policy::PolicyService> policy_service_; std::unique_ptr<policy::PolicyService> policy_service_;
// The keys to index KeyedService instances created by
// SimpleKeyedServiceFactory if this is an original profile.
std::unique_ptr<SimpleFactoryKey> owned_key_;
std::unique_ptr<SimpleFactoryKey> owned_off_the_record_key_;
// The key to index KeyedService instances created by
// SimpleKeyedServiceFactory if this is an incognito profile.
SimpleFactoryKey* off_the_record_key_ = nullptr;
}; };
#endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment