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

Unified Diff: chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h

Issue 12647008: Refactor OAuth2TokenService to have profile- and device-based implementations. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: move function to minimize diff 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
diff --git a/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h b/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..a18bd8280ccec84fe7e9b003a68dfc03747e233f
--- /dev/null
+++ b/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
@@ -0,0 +1,38 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_H_
+#define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/chromeos/settings/device_oauth2_token_service.h"
+
+namespace base {
+template <typename T> struct DefaultLazyInstanceTraits;
+}
+
+namespace chromeos {
+
+class DeviceOAuth2TokenServiceFactory {
+ public:
+ // Returns the instance of the DeviceOAuth2TokenService singleton.
+ static DeviceOAuth2TokenService* Get();
+
+ private:
+ DeviceOAuth2TokenServiceFactory();
+ virtual ~DeviceOAuth2TokenServiceFactory();
+ friend struct base::DefaultLazyInstanceTraits<
Andrew T Wilson (Slow) 2013/03/19 19:58:44 This is fine, but consider moving it to the top of
David Roche 2013/03/21 00:12:02 Done.
+ chromeos::DeviceOAuth2TokenServiceFactory>;
+
+ DeviceOAuth2TokenService* GetImpl();
+
+ scoped_ptr<DeviceOAuth2TokenService> device_oauth2_token_service_;
+
+ DISALLOW_COPY_AND_ASSIGN(DeviceOAuth2TokenServiceFactory);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698