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

Side by Side Diff: chrome/browser/extensions/api/hotword_private/hotword_private_api.h

Issue 166053003: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: | Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_
7 7
8 #include "base/prefs/pref_change_registrar.h" 8 #include "base/prefs/pref_change_registrar.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" 10 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
11 #include "chrome/browser/extensions/chrome_extension_function.h" 11 #include "chrome/browser/extensions/chrome_extension_function.h"
12 #include "chrome/common/extensions/api/hotword_private.h" 12 #include "chrome/common/extensions/api/hotword_private.h"
13 13
14 class Profile; 14 class Profile;
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 // Listens for changes in disable/enabled state and forwards as an extension 18 // Listens for changes in disable/enabled state and forwards as an extension
19 // event. 19 // event.
20 class HotwordPrivateEventService : public ProfileKeyedAPI { 20 class HotwordPrivateEventService : public ProfileKeyedAPI {
21 public: 21 public:
22 explicit HotwordPrivateEventService(Profile* profile); 22 explicit HotwordPrivateEventService(content::BrowserContext* context);
23 virtual ~HotwordPrivateEventService(); 23 virtual ~HotwordPrivateEventService();
24 24
25 // ProfileKeyedAPI implementation. 25 // ProfileKeyedAPI implementation.
26 virtual void Shutdown() OVERRIDE; 26 virtual void Shutdown() OVERRIDE;
27 static ProfileKeyedAPIFactory<HotwordPrivateEventService>* 27 static ProfileKeyedAPIFactory<HotwordPrivateEventService>*
28 GetFactoryInstance(); 28 GetFactoryInstance();
29 static const char* service_name(); 29 static const char* service_name();
30 30
31 void OnEnabledChanged(const std::string& pref_name); 31 void OnEnabledChanged(const std::string& pref_name);
32 32
(...skipping 27 matching lines...) Expand all
60 protected: 60 protected:
61 virtual ~HotwordPrivateGetStatusFunction() {} 61 virtual ~HotwordPrivateGetStatusFunction() {}
62 62
63 // ExtensionFunction: 63 // ExtensionFunction:
64 virtual bool RunImpl() OVERRIDE; 64 virtual bool RunImpl() OVERRIDE;
65 }; 65 };
66 66
67 } // namespace extensions 67 } // namespace extensions
68 68
69 #endif // CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ 69 #endif // CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698