| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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; | 14 class CrxInstaller; |
| 15 | 15 |
| 16 // Implemention of ExtensionServiceInterface with default | 16 // Implemention of ExtensionServiceInterface with default |
| 17 // implementations for methods that add failures. You should subclass | 17 // implementations for methods that add failures. You should subclass |
| 18 // this and override the methods you care about. | 18 // this and override the methods you care about. |
| 19 class TestExtensionService : public ExtensionServiceInterface { | 19 class TestExtensionService : public ExtensionServiceInterface { |
| 20 public: | 20 public: |
| 21 virtual ~TestExtensionService(); | 21 virtual ~TestExtensionService(); |
| 22 | 22 |
| 23 // ExtensionServiceInterface implementation. | 23 // ExtensionServiceInterface implementation. |
| 24 virtual const ExtensionSet* extensions() const OVERRIDE; | 24 virtual const ExtensionList* extensions() const OVERRIDE; |
| 25 virtual PendingExtensionManager* pending_extension_manager() OVERRIDE; | 25 virtual PendingExtensionManager* pending_extension_manager() OVERRIDE; |
| 26 | 26 |
| 27 virtual bool UpdateExtension( | 27 virtual bool UpdateExtension( |
| 28 const std::string& id, | 28 const std::string& id, |
| 29 const FilePath& path, | 29 const FilePath& path, |
| 30 const GURL& download_url, | 30 const GURL& download_url, |
| 31 CrxInstaller** out_crx_installer) OVERRIDE; | 31 CrxInstaller** out_crx_installer) OVERRIDE; |
| 32 virtual const Extension* GetExtensionById( | 32 virtual const Extension* GetExtensionById( |
| 33 const std::string& id, bool include_disabled) const OVERRIDE; | 33 const std::string& id, bool include_disabled) const OVERRIDE; |
| 34 virtual const Extension* GetInstalledExtension( | 34 virtual const Extension* GetInstalledExtension( |
| (...skipping 21 matching lines...) Expand all Loading... |
| 56 virtual bool is_ready() OVERRIDE; | 56 virtual bool is_ready() OVERRIDE; |
| 57 | 57 |
| 58 virtual void AddExtension(const Extension* extension) OVERRIDE; | 58 virtual void AddExtension(const Extension* extension) OVERRIDE; |
| 59 | 59 |
| 60 virtual void UnloadExtension( | 60 virtual void UnloadExtension( |
| 61 const std::string& extension_id, | 61 const std::string& extension_id, |
| 62 extension_misc::UnloadedExtensionReason reason) OVERRIDE; | 62 extension_misc::UnloadedExtensionReason reason) OVERRIDE; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SERVICE_H_ | 65 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SERVICE_H_ |
| OLD | NEW |