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/test_extension_prefs.cc

Issue 1025613003: Fix for ERROR:url_pattern_set.cc(240)] Invalid url pattern: chrome://print/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 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
« no previous file with comments | « chrome/browser/extensions/test_extension_prefs.h ('k') | extensions/browser/extension_prefs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/browser/extensions/test_extension_prefs.h" 5 #include "chrome/browser/extensions/test_extension_prefs.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 std::string()); 169 std::string());
170 return extension; 170 return extension;
171 } 171 }
172 172
173 std::string TestExtensionPrefs::AddExtensionAndReturnId( 173 std::string TestExtensionPrefs::AddExtensionAndReturnId(
174 const std::string& name) { 174 const std::string& name) {
175 scoped_refptr<Extension> extension(AddExtension(name)); 175 scoped_refptr<Extension> extension(AddExtension(name));
176 return extension->id(); 176 return extension->id();
177 } 177 }
178 178
179 void TestExtensionPrefs::AddExtension(Extension* extension) {
180 prefs_->OnExtensionInstalled(extension,
181 Extension::ENABLED,
182 syncer::StringOrdinal::CreateInitialOrdinal(),
183 std::string());
184 }
185
179 PrefService* TestExtensionPrefs::CreateIncognitoPrefService() const { 186 PrefService* TestExtensionPrefs::CreateIncognitoPrefService() const {
180 return pref_service_->CreateIncognitoPrefService( 187 return pref_service_->CreateIncognitoPrefService(
181 new ExtensionPrefStore(extension_pref_value_map_.get(), true)); 188 new ExtensionPrefStore(extension_pref_value_map_.get(), true));
182 } 189 }
183 190
184 void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) { 191 void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) {
185 extensions_disabled_ = extensions_disabled; 192 extensions_disabled_ = extensions_disabled;
186 } 193 }
187 194
188 } // namespace extensions 195 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_prefs.h ('k') | extensions/browser/extension_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698