Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: chrome/browser/extensions/mock_extension_service.h

Issue 6852029: [Sync] Move some extension-sync-related logic to ExtensionService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address asargent's comments Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_MOCK_EXTENSION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_MOCK_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 // Needed to keep gmock happy.
14 #include "chrome/browser/extensions/extension_sync_data.h"
13 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
14 16
15 class MockExtensionService : public ExtensionServiceInterface { 17 class MockExtensionService : public ExtensionServiceInterface {
16 public: 18 public:
17 MockExtensionService(); 19 MockExtensionService();
18 virtual ~MockExtensionService(); 20 virtual ~MockExtensionService();
19 21
20 MOCK_CONST_METHOD0(extensions, const ExtensionList*()); 22 MOCK_CONST_METHOD0(extensions, const ExtensionList*());
21 MOCK_CONST_METHOD0(disabled_extensions, const ExtensionList*()); 23 MOCK_CONST_METHOD0(disabled_extensions, const ExtensionList*());
22 MOCK_METHOD0(pending_extension_manager, PendingExtensionManager*()); 24 MOCK_METHOD0(pending_extension_manager, PendingExtensionManager*());
23 MOCK_METHOD3(UpdateExtension, void(const std::string&, 25 MOCK_METHOD3(UpdateExtension, void(const std::string&,
24 const FilePath&, 26 const FilePath&,
25 const GURL&)); 27 const GURL&));
26 MOCK_CONST_METHOD2(GetExtensionById, 28 MOCK_CONST_METHOD2(GetExtensionById,
27 const Extension*(const std::string&, bool)); 29 const Extension*(const std::string&, bool));
28 MOCK_METHOD3(UninstallExtension, 30 MOCK_METHOD3(UninstallExtension,
29 bool(const std::string&, bool, std::string*)); 31 bool(const std::string&, bool, std::string*));
30 MOCK_CONST_METHOD1(IsExtensionEnabled, bool(const std::string&)); 32 MOCK_CONST_METHOD1(IsExtensionEnabled, bool(const std::string&));
31 MOCK_CONST_METHOD1(IsExternalExtensionUninstalled, 33 MOCK_CONST_METHOD1(IsExternalExtensionUninstalled,
32 bool(const std::string&)); 34 bool(const std::string&));
33 MOCK_METHOD1(EnableExtension, void(const std::string&)); 35 MOCK_METHOD1(EnableExtension, void(const std::string&));
34 MOCK_METHOD1(DisableExtension, void(const std::string&)); 36 MOCK_METHOD1(DisableExtension, void(const std::string&));
35 MOCK_METHOD1(UpdateExtensionBlacklist, 37 MOCK_METHOD1(UpdateExtensionBlacklist,
36 void(const std::vector<std::string>&)); 38 void(const std::vector<std::string>&));
37 MOCK_METHOD0(CheckAdminBlacklist, void()); 39 MOCK_METHOD0(CheckAdminBlacklist, void());
38 MOCK_CONST_METHOD1(IsIncognitoEnabled, bool(const std::string&)); 40 MOCK_CONST_METHOD1(IsIncognitoEnabled, bool(const std::string&));
39 MOCK_METHOD2(SetIsIncognitoEnabled, void(const std::string&, bool)); 41 MOCK_METHOD2(SetIsIncognitoEnabled, void(const std::string&, bool));
40 MOCK_METHOD0(CheckForUpdatesSoon, void()); 42 MOCK_METHOD0(CheckForUpdatesSoon, void());
43 MOCK_METHOD2(ProcessSyncData,
44 void(const ExtensionSyncData&,
45 PendingExtensionInfo::ShouldAllowInstallPredicate
46 should_allow_install));
41 }; 47 };
42 48
43 #endif // CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SERVICE_H_ 49 #endif // CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_updater_unittest.cc ('k') | chrome/browser/sync/glue/extension_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698