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

Side by Side Diff: chrome/browser/extensions/test_extension_prefs.cc

Issue 8898027: Revert 114083 - Convert app_launch_index and page_index from int to StringOrdinal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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/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/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 FilePath path = extensions_dir_.AppendASCII(name); 136 FilePath path = extensions_dir_.AppendASCII(name);
137 std::string errors; 137 std::string errors;
138 scoped_refptr<Extension> extension = Extension::Create( 138 scoped_refptr<Extension> extension = Extension::Create(
139 path, location, manifest, extra_flags, &errors); 139 path, location, manifest, extra_flags, &errors);
140 EXPECT_TRUE(extension) << errors; 140 EXPECT_TRUE(extension) << errors;
141 if (!extension) 141 if (!extension)
142 return NULL; 142 return NULL;
143 143
144 EXPECT_TRUE(Extension::IdIsValid(extension->id())); 144 EXPECT_TRUE(Extension::IdIsValid(extension->id()));
145 prefs_->OnExtensionInstalled(extension, Extension::ENABLED, 145 prefs_->OnExtensionInstalled(extension, Extension::ENABLED,
146 extra_flags & Extension::FROM_WEBSTORE, 146 extra_flags & Extension::FROM_WEBSTORE, 0);
147 StringOrdinal::CreateInitialOrdinal());
148 return extension; 147 return extension;
149 } 148 }
150 149
151 std::string TestExtensionPrefs::AddExtensionAndReturnId(std::string name) { 150 std::string TestExtensionPrefs::AddExtensionAndReturnId(std::string name) {
152 scoped_refptr<Extension> extension(AddExtension(name)); 151 scoped_refptr<Extension> extension(AddExtension(name));
153 return extension->id(); 152 return extension->id();
154 } 153 }
155 154
156 PrefService* TestExtensionPrefs::CreateIncognitoPrefService() const { 155 PrefService* TestExtensionPrefs::CreateIncognitoPrefService() const {
157 return pref_service_->CreateIncognitoPrefService( 156 return pref_service_->CreateIncognitoPrefService(
158 new ExtensionPrefStore(extension_pref_value_map_.get(), true)); 157 new ExtensionPrefStore(extension_pref_value_map_.get(), true));
159 } 158 }
160 159
161 void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) { 160 void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) {
162 extensions_disabled_ = extensions_disabled; 161 extensions_disabled_ = extensions_disabled;
163 } 162 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/unpacked_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698