diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 10:22:43 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 12:36:28 +0000 |
commit | 271a6c3487a14599023a9106329505597638d793 (patch) | |
tree | e040d58ffc86c1480b79ca8528020ca9ec919bf8 /chromium/components/keyed_service | |
parent | 7b2ffa587235a47d4094787d72f38102089f402a (diff) | |
download | qtwebengine-chromium-271a6c3487a14599023a9106329505597638d793.tar.gz |
BASELINE: Update Chromium to 77.0.3865.59
Change-Id: I1e89a5f3b009a9519a6705102ad65c92fe736f21
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/components/keyed_service')
4 files changed, 9 insertions, 7 deletions
diff --git a/chromium/components/keyed_service/content/browser_context_dependency_manager.cc b/chromium/components/keyed_service/content/browser_context_dependency_manager.cc index e5a255e5a17..d1599e387d0 100644 --- a/chromium/components/keyed_service/content/browser_context_dependency_manager.cc +++ b/chromium/components/keyed_service/content/browser_context_dependency_manager.cc @@ -90,9 +90,8 @@ void BrowserContextDependencyManager::DumpContextDependencies( if (base::CommandLine::ForCurrentProcess()->HasSwitch( kDumpBrowserContextDependencyGraphFlag)) { base::FilePath dot_file = - static_cast<const content::BrowserContext*>(context) - ->GetPath() - .AppendASCII("browser-context-dependencies.dot"); + static_cast<content::BrowserContext*>(context)->GetPath().AppendASCII( + "browser-context-dependencies.dot"); DumpDependenciesAsGraphviz("BrowserContext", dot_file); } } diff --git a/chromium/components/keyed_service/core/keyed_service_base_factory.cc b/chromium/components/keyed_service/core/keyed_service_base_factory.cc index 5c8f40f4adb..d27b20935a2 100644 --- a/chromium/components/keyed_service/core/keyed_service_base_factory.cc +++ b/chromium/components/keyed_service/core/keyed_service_base_factory.cc @@ -23,6 +23,9 @@ KeyedServiceBaseFactory::~KeyedServiceBaseFactory() { } void KeyedServiceBaseFactory::DependsOn(KeyedServiceBaseFactory* rhs) { + CHECK_NE(rhs, this) + << "A KeyedServiceBaseFactory instance must not depend on itself"; + // Each type can only depend on other services that are of the same type. if (rhs->type() != type_) return; diff --git a/chromium/components/keyed_service/core/keyed_service_factory.cc b/chromium/components/keyed_service/core/keyed_service_factory.cc index 635df2897e5..f24edcb3a6d 100644 --- a/chromium/components/keyed_service/core/keyed_service_factory.cc +++ b/chromium/components/keyed_service/core/keyed_service_factory.cc @@ -83,7 +83,7 @@ KeyedService* KeyedServiceFactory::GetServiceForContext(void* context, KeyedService* KeyedServiceFactory::Associate( void* context, std::unique_ptr<KeyedService> service) { - DCHECK(!base::ContainsKey(mapping_, context)); + DCHECK(!base::Contains(mapping_, context)); auto iterator = mapping_.emplace(context, std::move(service)).first; return iterator->second.get(); } @@ -117,5 +117,5 @@ void KeyedServiceFactory::SetEmptyTestingFactory(void* context) { } bool KeyedServiceFactory::HasTestingFactory(void* context) { - return base::ContainsKey(testing_factories_, context); + return base::Contains(testing_factories_, context); } diff --git a/chromium/components/keyed_service/core/refcounted_keyed_service_factory.cc b/chromium/components/keyed_service/core/refcounted_keyed_service_factory.cc index 5bde50c27e0..4a60e858e41 100644 --- a/chromium/components/keyed_service/core/refcounted_keyed_service_factory.cc +++ b/chromium/components/keyed_service/core/refcounted_keyed_service_factory.cc @@ -82,7 +82,7 @@ RefcountedKeyedServiceFactory::GetServiceForContext(void* context, scoped_refptr<RefcountedKeyedService> RefcountedKeyedServiceFactory::Associate( void* context, scoped_refptr<RefcountedKeyedService> service) { - DCHECK(!base::ContainsKey(mapping_, context)); + DCHECK(!base::Contains(mapping_, context)); auto iterator = mapping_.emplace(context, std::move(service)).first; return iterator->second; } @@ -118,7 +118,7 @@ void RefcountedKeyedServiceFactory::SetEmptyTestingFactory(void* context) { } bool RefcountedKeyedServiceFactory::HasTestingFactory(void* context) { - return base::ContainsKey(testing_factories_, context); + return base::Contains(testing_factories_, context); } void RefcountedKeyedServiceFactory::CreateServiceNow(void* context) { |