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

Side by Side Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h

Issue 1135183002: Ensure EasyUnlockPrivateAPI factory is initialized on start up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: uncomment Created 5 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP I_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP I_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP I_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP I_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "device/bluetooth/bluetooth_device.h" 12 #include "device/bluetooth/bluetooth_device.h"
13 #include "extensions/browser/api/bluetooth/bluetooth_extension_function.h" 13 #include "extensions/browser/api/bluetooth/bluetooth_extension_function.h"
14 #include "extensions/browser/api/bluetooth_socket/bluetooth_socket_api.h" 14 #include "extensions/browser/api/bluetooth_socket/bluetooth_socket_api.h"
15 #include "extensions/browser/browser_context_keyed_api_factory.h" 15 #include "extensions/browser/browser_context_keyed_api_factory.h"
16 #include "extensions/browser/extension_function.h" 16 #include "extensions/browser/extension_function.h"
17 17
18 // Implementations for chrome.easyUnlockPrivate API functions. 18 // Implementations for chrome.easyUnlockPrivate API functions.
19 19
20 namespace content { 20 namespace content {
21 class BrowserContext; 21 class BrowserContext;
22 } 22 }
23 23
24 namespace extensions { 24 namespace extensions {
25 namespace api {
26
27 namespace easy_unlock {
28 struct SeekDeviceResult;
29 } // easy_unlock
30 25
31 class EasyUnlockPrivateCryptoDelegate; 26 class EasyUnlockPrivateCryptoDelegate;
32 27
33 class EasyUnlockPrivateAPI : public BrowserContextKeyedAPI { 28 class EasyUnlockPrivateAPI : public BrowserContextKeyedAPI {
34 public: 29 public:
35 static BrowserContextKeyedAPIFactory<EasyUnlockPrivateAPI>* 30 static BrowserContextKeyedAPIFactory<EasyUnlockPrivateAPI>*
36 GetFactoryInstance(); 31 GetFactoryInstance();
37 32
38 static const bool kServiceRedirectedInIncognito = true; 33 static const bool kServiceRedirectedInIncognito = true;
39 34
40 explicit EasyUnlockPrivateAPI(content::BrowserContext* context); 35 explicit EasyUnlockPrivateAPI(content::BrowserContext* context);
41 ~EasyUnlockPrivateAPI() override; 36 ~EasyUnlockPrivateAPI() override;
42 37
43 EasyUnlockPrivateCryptoDelegate* crypto_delegate() { 38 EasyUnlockPrivateCryptoDelegate* GetCryptoDelegate();
44 return crypto_delegate_.get();
45 }
46 39
47 private: 40 private:
48 friend class BrowserContextKeyedAPIFactory<EasyUnlockPrivateAPI>; 41 friend class BrowserContextKeyedAPIFactory<EasyUnlockPrivateAPI>;
49 42
50 // BrowserContextKeyedAPI implementation. 43 // BrowserContextKeyedAPI implementation.
51 static const char* service_name() { return "EasyUnlockPrivate"; } 44 static const char* service_name() { return "EasyUnlockPrivate"; }
52 45
53 scoped_ptr<EasyUnlockPrivateCryptoDelegate> crypto_delegate_; 46 scoped_ptr<EasyUnlockPrivateCryptoDelegate> crypto_delegate_;
54 47
55 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateAPI); 48 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateAPI);
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 385
393 private: 386 private:
394 ~EasyUnlockPrivateSetAutoPairingResultFunction() override; 387 ~EasyUnlockPrivateSetAutoPairingResultFunction() override;
395 388
396 // SyncExtensionFunction: 389 // SyncExtensionFunction:
397 bool RunSync() override; 390 bool RunSync() override;
398 391
399 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetAutoPairingResultFunction); 392 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetAutoPairingResultFunction);
400 }; 393 };
401 394
402 } // namespace api
403 } // namespace extensions 395 } // namespace extensions
404 396
405 #endif // CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE _API_H_ 397 #endif // CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE _API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698