| 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;
|
| +};
|
| +
|
| +} // namespace chromeos
|
| +
|
| +#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_NETWORKING_PRIVATE_API_FACTORY_H_
|
|
|