| 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; | 14 class CrxInstaller; |
| 15 |
| 16 namespace csync { |
| 15 class SyncErrorFactory; | 17 class SyncErrorFactory; |
| 18 } |
| 16 | 19 |
| 17 namespace extensions { | 20 namespace extensions { |
| 18 class Extension; | 21 class Extension; |
| 19 } | 22 } |
| 20 | 23 |
| 21 // Implemention of ExtensionServiceInterface with default | 24 // Implemention of ExtensionServiceInterface with default |
| 22 // implementations for methods that add failures. You should subclass | 25 // implementations for methods that add failures. You should subclass |
| 23 // this and override the methods you care about. | 26 // this and override the methods you care about. |
| 24 class TestExtensionService : public ExtensionServiceInterface { | 27 class TestExtensionService : public ExtensionServiceInterface { |
| 25 public: | 28 public: |
| (...skipping 16 matching lines...) Expand all Loading... |
| 42 virtual bool IsExtensionEnabled( | 45 virtual bool IsExtensionEnabled( |
| 43 const std::string& extension_id) const OVERRIDE; | 46 const std::string& extension_id) const OVERRIDE; |
| 44 virtual bool IsExternalExtensionUninstalled( | 47 virtual bool IsExternalExtensionUninstalled( |
| 45 const std::string& extension_id) const OVERRIDE; | 48 const std::string& extension_id) const OVERRIDE; |
| 46 | 49 |
| 47 virtual void UpdateExtensionBlacklist( | 50 virtual void UpdateExtensionBlacklist( |
| 48 const std::vector<std::string>& blacklist) OVERRIDE; | 51 const std::vector<std::string>& blacklist) OVERRIDE; |
| 49 virtual void CheckAdminBlacklist() OVERRIDE; | 52 virtual void CheckAdminBlacklist() OVERRIDE; |
| 50 virtual void CheckForUpdatesSoon() OVERRIDE; | 53 virtual void CheckForUpdatesSoon() OVERRIDE; |
| 51 | 54 |
| 52 virtual SyncError MergeDataAndStartSyncing( | 55 virtual csync::SyncError MergeDataAndStartSyncing( |
| 53 syncable::ModelType type, | 56 syncable::ModelType type, |
| 54 const SyncDataList& initial_sync_data, | 57 const csync::SyncDataList& initial_sync_data, |
| 55 scoped_ptr<SyncChangeProcessor> sync_processor, | 58 scoped_ptr<csync::SyncChangeProcessor> sync_processor, |
| 56 scoped_ptr<SyncErrorFactory> sync_error_factory) OVERRIDE; | 59 scoped_ptr<csync::SyncErrorFactory> sync_error_factory) OVERRIDE; |
| 57 virtual void StopSyncing(syncable::ModelType type) OVERRIDE; | 60 virtual void StopSyncing(syncable::ModelType type) OVERRIDE; |
| 58 virtual SyncDataList GetAllSyncData(syncable::ModelType type) const OVERRIDE; | 61 virtual csync::SyncDataList GetAllSyncData( |
| 59 virtual SyncError ProcessSyncChanges( | 62 syncable::ModelType type) const OVERRIDE; |
| 63 virtual csync::SyncError ProcessSyncChanges( |
| 60 const tracked_objects::Location& from_here, | 64 const tracked_objects::Location& from_here, |
| 61 const SyncChangeList& change_list) OVERRIDE; | 65 const csync::SyncChangeList& change_list) OVERRIDE; |
| 62 | 66 |
| 63 virtual bool is_ready() OVERRIDE; | 67 virtual bool is_ready() OVERRIDE; |
| 64 | 68 |
| 65 virtual void AddExtension(const extensions::Extension* extension) OVERRIDE; | 69 virtual void AddExtension(const extensions::Extension* extension) OVERRIDE; |
| 66 | 70 |
| 67 virtual void UnloadExtension( | 71 virtual void UnloadExtension( |
| 68 const std::string& extension_id, | 72 const std::string& extension_id, |
| 69 extension_misc::UnloadedExtensionReason reason) OVERRIDE; | 73 extension_misc::UnloadedExtensionReason reason) OVERRIDE; |
| 70 | 74 |
| 71 virtual void SyncExtensionChangeIfNeeded( | 75 virtual void SyncExtensionChangeIfNeeded( |
| 72 const extensions::Extension& extension) OVERRIDE; | 76 const extensions::Extension& extension) OVERRIDE; |
| 73 }; | 77 }; |
| 74 | 78 |
| 75 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SERVICE_H_ | 79 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SERVICE_H_ |
| OLD | NEW |