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

Unified Diff: chrome/browser/chromeos/ownership/owner_settings_service_factory.h

Issue 516243002: Instantiation of OwnerKeyUtil is delegated to OwnerSettingsServiceFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: BUILD.gn is fixed + style fixes. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/ownership/owner_settings_service_factory.h
diff --git a/chrome/browser/chromeos/ownership/owner_settings_service_factory.h b/chrome/browser/chromeos/ownership/owner_settings_service_factory.h
index e98773a7732e9213b3dd6904b2d515e732f3f756..58de60d2a76e487cdf4c21906260f57dd125c04c 100644
--- a/chrome/browser/chromeos/ownership/owner_settings_service_factory.h
+++ b/chrome/browser/chromeos/ownership/owner_settings_service_factory.h
@@ -9,8 +9,10 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
+#include "components/ownership/owner_key_util.h"
class KeyedService;
class Profile;
@@ -25,6 +27,13 @@ class OwnerSettingsServiceFactory : public BrowserContextKeyedServiceFactory {
static OwnerSettingsServiceFactory* GetInstance();
+ scoped_refptr<ownership::OwnerKeyUtil> GetOwnerKeyUtil();
+
+ void set_owner_key_util_for_testing(
+ const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util) {
+ owner_key_util_ = owner_key_util;
erikwright (departed) 2014/09/02 19:13:56 I'm not sure if it's appropriate to inline an assi
ygorshenin1 2014/09/03 10:14:58 Done.
+ }
+
private:
friend struct DefaultSingletonTraits<OwnerSettingsServiceFactory>;
@@ -40,6 +49,8 @@ class OwnerSettingsServiceFactory : public BrowserContextKeyedServiceFactory {
virtual KeyedService* BuildServiceInstanceFor(
content::BrowserContext* browser_context) const OVERRIDE;
+ scoped_refptr<ownership::OwnerKeyUtil> owner_key_util_;
+
DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceFactory);
};

Powered by Google App Engine
This is Rietveld 408576698