OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SIGNIN_GAIA_AUTH_EXTENSION_LOADER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SIGNIN_GAIA_AUTH_EXTENSION_LOADER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_SIGNIN_GAIA_AUTH_EXTENSION_LOADER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SIGNIN_GAIA_AUTH_EXTENSION_LOADER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "extensions/browser/browser_context_keyed_api_factory.h" | 9 #include "extensions/browser/browser_context_keyed_api_factory.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 class BrowserContext; | 12 class BrowserContext; |
13 } | 13 } |
14 | 14 |
15 namespace extensions { | 15 namespace extensions { |
16 | 16 |
| 17 const char kGaiaAuthExtensionId[] = "mfffpogegjflfpflabcdkioaeobkgjik"; |
| 18 const char kGaiaAuthExtensionOrigin[] = |
| 19 "chrome-extension://mfffpogegjflfpflabcdkioaeobkgjik"; |
| 20 |
17 // Manages and registers the gaia auth extension with the extension system. | 21 // Manages and registers the gaia auth extension with the extension system. |
18 class GaiaAuthExtensionLoader : public BrowserContextKeyedAPI { | 22 class GaiaAuthExtensionLoader : public BrowserContextKeyedAPI { |
19 public: | 23 public: |
20 explicit GaiaAuthExtensionLoader(content::BrowserContext* context); | 24 explicit GaiaAuthExtensionLoader(content::BrowserContext* context); |
21 virtual ~GaiaAuthExtensionLoader(); | 25 virtual ~GaiaAuthExtensionLoader(); |
22 | 26 |
23 // Load the gaia auth extension if the extension is not loaded yet. | 27 // Load the gaia auth extension if the extension is not loaded yet. |
24 void LoadIfNeeded(); | 28 void LoadIfNeeded(); |
25 // Unload the gaia auth extension if no pending reference. | 29 // Unload the gaia auth extension if no pending reference. |
26 void UnloadIfNeeded(); | 30 void UnloadIfNeeded(); |
(...skipping 18 matching lines...) Expand all Loading... |
45 | 49 |
46 content::BrowserContext* browser_context_; | 50 content::BrowserContext* browser_context_; |
47 int load_count_; | 51 int load_count_; |
48 | 52 |
49 DISALLOW_COPY_AND_ASSIGN(GaiaAuthExtensionLoader); | 53 DISALLOW_COPY_AND_ASSIGN(GaiaAuthExtensionLoader); |
50 }; | 54 }; |
51 | 55 |
52 } // namespace extensions | 56 } // namespace extensions |
53 | 57 |
54 #endif // CHROME_BROWSER_EXTENSIONS_SIGNIN_GAIA_AUTH_EXTENSION_LOADER_H_ | 58 #endif // CHROME_BROWSER_EXTENSIONS_SIGNIN_GAIA_AUTH_EXTENSION_LOADER_H_ |
OLD | NEW |