OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TEST_EXTENSION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
12 | 12 |
13 class CrxInstaller; | |
14 | |
15 namespace syncer { | 13 namespace syncer { |
16 class SyncErrorFactory; | 14 class SyncErrorFactory; |
17 } | 15 } |
18 | 16 |
19 namespace extensions { | 17 namespace extensions { |
| 18 class CrxInstaller; |
20 class Extension; | 19 class Extension; |
21 } | 20 } |
22 | 21 |
23 // Implemention of ExtensionServiceInterface with default | 22 // Implemention of ExtensionServiceInterface with default |
24 // implementations for methods that add failures. You should subclass | 23 // implementations for methods that add failures. You should subclass |
25 // this and override the methods you care about. | 24 // this and override the methods you care about. |
26 class TestExtensionService : public ExtensionServiceInterface { | 25 class TestExtensionService : public ExtensionServiceInterface { |
27 public: | 26 public: |
28 virtual ~TestExtensionService(); | 27 virtual ~TestExtensionService(); |
29 | 28 |
30 // ExtensionServiceInterface implementation. | 29 // ExtensionServiceInterface implementation. |
31 virtual const ExtensionSet* extensions() const OVERRIDE; | 30 virtual const ExtensionSet* extensions() const OVERRIDE; |
32 virtual const ExtensionSet* disabled_extensions() const OVERRIDE; | 31 virtual const ExtensionSet* disabled_extensions() const OVERRIDE; |
33 virtual PendingExtensionManager* pending_extension_manager() OVERRIDE; | 32 virtual PendingExtensionManager* pending_extension_manager() OVERRIDE; |
34 | 33 |
35 virtual bool UpdateExtension( | 34 virtual bool UpdateExtension( |
36 const std::string& id, | 35 const std::string& id, |
37 const FilePath& path, | 36 const FilePath& path, |
38 const GURL& download_url, | 37 const GURL& download_url, |
39 CrxInstaller** out_crx_installer) OVERRIDE; | 38 extensions::CrxInstaller** out_crx_installer) OVERRIDE; |
40 virtual const extensions::Extension* GetExtensionById( | 39 virtual const extensions::Extension* GetExtensionById( |
41 const std::string& id, bool include_disabled) const OVERRIDE; | 40 const std::string& id, bool include_disabled) const OVERRIDE; |
42 virtual const extensions::Extension* GetInstalledExtension( | 41 virtual const extensions::Extension* GetInstalledExtension( |
43 const std::string& id) const OVERRIDE; | 42 const std::string& id) const OVERRIDE; |
44 virtual bool IsExtensionEnabled( | 43 virtual bool IsExtensionEnabled( |
45 const std::string& extension_id) const OVERRIDE; | 44 const std::string& extension_id) const OVERRIDE; |
46 virtual bool IsExternalExtensionUninstalled( | 45 virtual bool IsExternalExtensionUninstalled( |
47 const std::string& extension_id) const OVERRIDE; | 46 const std::string& extension_id) const OVERRIDE; |
48 | 47 |
49 virtual void UpdateExtensionBlacklist( | 48 virtual void UpdateExtensionBlacklist( |
(...skipping 19 matching lines...) Expand all Loading... |
69 | 68 |
70 virtual void UnloadExtension( | 69 virtual void UnloadExtension( |
71 const std::string& extension_id, | 70 const std::string& extension_id, |
72 extension_misc::UnloadedExtensionReason reason) OVERRIDE; | 71 extension_misc::UnloadedExtensionReason reason) OVERRIDE; |
73 | 72 |
74 virtual void SyncExtensionChangeIfNeeded( | 73 virtual void SyncExtensionChangeIfNeeded( |
75 const extensions::Extension& extension) OVERRIDE; | 74 const extensions::Extension& extension) OVERRIDE; |
76 }; | 75 }; |
77 | 76 |
78 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SERVICE_H_ | 77 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SERVICE_H_ |
OLD | NEW |