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

Unified Diff: chrome/browser/chromeos/extensions/networking_private_api_factory.h

Issue 11975015: This adds a private extension API to use for simple networking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Converting to ONC Created 7 years, 11 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/extensions/networking_private_api_factory.h
diff --git a/chrome/browser/chromeos/extensions/networking_private_api_factory.h b/chrome/browser/chromeos/extensions/networking_private_api_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..66da8cbba9225fdd21c1a8e889da08b5e87f241b
--- /dev/null
+++ b/chrome/browser/chromeos/extensions/networking_private_api_factory.h
@@ -0,0 +1,47 @@
+// Copyright (c) 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_EXTENSIONS_NETWORKING_PRIVATE_API_FACTORY_H_
+#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_NETWORKING_PRIVATE_API_FACTORY_H_
+
+#include "base/memory/singleton.h"
+#include "chrome/browser/profiles/profile_keyed_service_factory.h"
+
+class Profile;
+
+namespace chromeos {
+
+class NetworkingPrivateAPI;
+
+// This is a factory class used by the ProfileDependencyManager to instantiate
+// the private API.
+class NetworkingPrivateAPIFactory : public ProfileKeyedServiceFactory {
+ public:
+ // Returns the NetworkingPrivateAPI for |profile|, creating it if
+ // it is not yet created.
+ static NetworkingPrivateAPI* GetForProfile(Profile* profile);
+
+ // Returns the NetworkingPrivateAPIFactory instance.
+ static NetworkingPrivateAPIFactory* GetInstance();
+
+ protected:
+ // ProfileKeyedBaseFactory overrides:
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
+
+ private:
+ friend struct DefaultSingletonTraits<NetworkingPrivateAPIFactory>;
+
+ NetworkingPrivateAPIFactory();
+ virtual ~NetworkingPrivateAPIFactory();
+
+ // ProfileKeyedServiceFactory:
+ virtual ProfileKeyedService* BuildServiceInstanceFor(
+ Profile* profile) const OVERRIDE;
+};
pneubeck (no reviews) 2013/01/18 13:22:36 not strictly necessary, but maybe good for documen
Greg Spencer (Chromium) 2013/01/18 19:53:56 Done.
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_NETWORKING_PRIVATE_API_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698