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

Side by Side Diff: chrome/browser/extensions/settings/settings_test_util.cc

Issue 8477005: Add policies to specify an enterprise web store. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Finally. Created 9 years, 1 month 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 #include "chrome/browser/extensions/settings/settings_test_util.h" 5 #include "chrome/browser/extensions/settings/settings_test_util.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "chrome/common/extensions/extension.h" 8 #include "chrome/common/extensions/extension.h"
9 #include "chrome/browser/extensions/settings/settings_frontend.h" 9 #include "chrome/browser/extensions/settings/settings_frontend.h"
10 10
(...skipping 21 matching lines...) Expand all
32 MockExtensionService::~MockExtensionService() {} 32 MockExtensionService::~MockExtensionService() {}
33 33
34 const Extension* MockExtensionService::GetExtensionById( 34 const Extension* MockExtensionService::GetExtensionById(
35 const std::string& id, bool include_disabled) const { 35 const std::string& id, bool include_disabled) const {
36 std::map<std::string, scoped_refptr<Extension> >::const_iterator 36 std::map<std::string, scoped_refptr<Extension> >::const_iterator
37 maybe_extension = extensions_.find(id); 37 maybe_extension = extensions_.find(id);
38 return maybe_extension == extensions_.end() ? 38 return maybe_extension == extensions_.end() ?
39 NULL : maybe_extension->second.get(); 39 NULL : maybe_extension->second.get();
40 } 40 }
41 41
42 void MockExtensionService::AddExtension( 42 void MockExtensionService::AddExtensionWithId(
43 const std::string& id, Extension::Type type) { 43 const std::string& id, Extension::Type type) {
44 DictionaryValue manifest; 44 DictionaryValue manifest;
45 manifest.SetString("name", std::string("Test extension ") + id); 45 manifest.SetString("name", std::string("Test extension ") + id);
46 manifest.SetString("version", "1.0"); 46 manifest.SetString("version", "1.0");
47 47
48 switch (type) { 48 switch (type) {
49 case Extension::TYPE_EXTENSION: 49 case Extension::TYPE_EXTENSION:
50 break; 50 break;
51 51
52 case Extension::TYPE_PACKAGED_APP: { 52 case Extension::TYPE_PACKAGED_APP: {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return static_cast<ExtensionService*>(as_interface); 90 return static_cast<ExtensionService*>(as_interface);
91 } 91 }
92 92
93 ExtensionEventRouter* MockProfile::GetExtensionEventRouter() { 93 ExtensionEventRouter* MockProfile::GetExtensionEventRouter() {
94 return event_router_.get(); 94 return event_router_.get();
95 } 95 }
96 96
97 } // namespace settings_test_util 97 } // namespace settings_test_util
98 98
99 } // namespace extensions 99 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698