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

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

Issue 12188027: This adds the onNetworkChanged event to networkingPrivate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing virtual keyword Created 7 years, 10 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_event_router_factory.h
diff --git a/chrome/browser/chromeos/extensions/networking_private_event_router_factory.h b/chrome/browser/chromeos/extensions/networking_private_event_router_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..5f7cfc6c7a110822268f642d0f055219c00ae7ea
--- /dev/null
+++ b/chrome/browser/chromeos/extensions/networking_private_event_router_factory.h
@@ -0,0 +1,50 @@
+// 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_EVENT_ROUTER_FACTORY_H_
+#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_NETWORKING_PRIVATE_EVENT_ROUTER_FACTORY_H_
+
+#include "base/memory/singleton.h"
+#include "chrome/browser/profiles/profile_keyed_service_factory.h"
+
+class Profile;
+
+namespace chromeos {
+
+class NetworkingPrivateEventRouter;
+
+// This is a factory class used by the ProfileDependencyManager to instantiate
+// the networking event router per profile (since the extension event router is
+// per profile).
+class NetworkingPrivateEventRouterFactory : public ProfileKeyedServiceFactory {
+ public:
+ // Returns the NetworkingPrivateEventRouter for |profile|, creating it if
+ // it is not yet created.
+ static NetworkingPrivateEventRouter* GetForProfile(Profile* profile);
+
+ // Returns the NetworkingPrivateEventRouterFactory instance.
+ static NetworkingPrivateEventRouterFactory* GetInstance();
+
+ protected:
+ // ProfileKeyedBaseFactory overrides:
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
+
+ private:
+ friend struct DefaultSingletonTraits<NetworkingPrivateEventRouterFactory>;
+
+ NetworkingPrivateEventRouterFactory();
+ virtual ~NetworkingPrivateEventRouterFactory();
+
+ // ProfileKeyedServiceFactory:
+ virtual ProfileKeyedService* BuildServiceInstanceFor(
+ Profile* profile) const OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateEventRouterFactory);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_NETWORKING_PRIVATE_EVENT_ROUTER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698