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

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

Issue 7677032: ntp4: make app-install-via-drag less janky (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more test fixes Created 9 years, 4 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 #include "chrome/browser/extensions/test_extension_prefs.h" 5 #include "chrome/browser/extensions/test_extension_prefs.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 FilePath path = extensions_dir_.AppendASCII(name); 116 FilePath path = extensions_dir_.AppendASCII(name);
117 std::string errors; 117 std::string errors;
118 scoped_refptr<Extension> extension = Extension::Create( 118 scoped_refptr<Extension> extension = Extension::Create(
119 path, location, manifest, extra_flags, &errors); 119 path, location, manifest, extra_flags, &errors);
120 EXPECT_TRUE(extension); 120 EXPECT_TRUE(extension);
121 if (!extension) 121 if (!extension)
122 return NULL; 122 return NULL;
123 123
124 EXPECT_TRUE(Extension::IdIsValid(extension->id())); 124 EXPECT_TRUE(Extension::IdIsValid(extension->id()));
125 prefs_->OnExtensionInstalled(extension, Extension::ENABLED, 125 prefs_->OnExtensionInstalled(extension, Extension::ENABLED,
126 extra_flags & Extension::FROM_WEBSTORE); 126 extra_flags & Extension::FROM_WEBSTORE, 0);
127 return extension; 127 return extension;
128 } 128 }
129 129
130 std::string TestExtensionPrefs::AddExtensionAndReturnId(std::string name) { 130 std::string TestExtensionPrefs::AddExtensionAndReturnId(std::string name) {
131 scoped_refptr<Extension> extension(AddExtension(name)); 131 scoped_refptr<Extension> extension(AddExtension(name));
132 return extension->id(); 132 return extension->id();
133 } 133 }
134 134
135 PrefService* TestExtensionPrefs::CreateIncognitoPrefService() const { 135 PrefService* TestExtensionPrefs::CreateIncognitoPrefService() const {
136 return pref_service_->CreateIncognitoPrefService( 136 return pref_service_->CreateIncognitoPrefService(
137 new ExtensionPrefStore(extension_pref_value_map_.get(), true)); 137 new ExtensionPrefStore(extension_pref_value_map_.get(), true));
138 } 138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698