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