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

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: Rebasse. 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 23 matching lines...) Expand all
34 MockExtensionService::~MockExtensionService() {} 34 MockExtensionService::~MockExtensionService() {}
35 35
36 const Extension* MockExtensionService::GetExtensionById( 36 const Extension* MockExtensionService::GetExtensionById(
37 const std::string& id, bool include_disabled) const { 37 const std::string& id, bool include_disabled) const {
38 std::map<std::string, scoped_refptr<Extension> >::const_iterator 38 std::map<std::string, scoped_refptr<Extension> >::const_iterator
39 maybe_extension = extensions_.find(id); 39 maybe_extension = extensions_.find(id);
40 return maybe_extension == extensions_.end() ? 40 return maybe_extension == extensions_.end() ?
41 NULL : maybe_extension->second.get(); 41 NULL : maybe_extension->second.get();
42 } 42 }
43 43
44 void MockExtensionService::AddExtension( 44 void MockExtensionService::AddExtensionWithId(
45 const std::string& id, Extension::Type type) { 45 const std::string& id, Extension::Type type) {
46 DictionaryValue manifest; 46 DictionaryValue manifest;
47 manifest.SetString("name", std::string("Test extension ") + id); 47 manifest.SetString("name", std::string("Test extension ") + id);
48 manifest.SetString("version", "1.0"); 48 manifest.SetString("version", "1.0");
49 49
50 switch (type) { 50 switch (type) {
51 case Extension::TYPE_EXTENSION: 51 case Extension::TYPE_EXTENSION:
52 break; 52 break;
53 53
54 case Extension::TYPE_PACKAGED_APP: { 54 case Extension::TYPE_PACKAGED_APP: {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 SettingsStorage* ScopedSettingsStorageFactory::Create( 115 SettingsStorage* ScopedSettingsStorageFactory::Create(
116 const FilePath& base_path, const std::string& extension_id) { 116 const FilePath& base_path, const std::string& extension_id) {
117 return delegate_->Create(base_path, extension_id); 117 return delegate_->Create(base_path, extension_id);
118 } 118 }
119 119
120 } // namespace settings_test_util 120 } // namespace settings_test_util
121 121
122 } // namespace extensions 122 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698