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

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

Issue 342068: Third patch in getting rid of caching MessageLoop pointers and always using C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 <algorithm> 5 #include <algorithm>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED, 203 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
204 NotificationService::AllSources()); 204 NotificationService::AllSources());
205 registrar_.Add(this, NotificationType::EXTENSION_INSTALLED, 205 registrar_.Add(this, NotificationType::EXTENSION_INSTALLED,
206 NotificationService::AllSources()); 206 NotificationService::AllSources());
207 registrar_.Add(this, NotificationType::THEME_INSTALLED, 207 registrar_.Add(this, NotificationType::THEME_INSTALLED,
208 NotificationService::AllSources()); 208 NotificationService::AllSources());
209 } 209 }
210 210
211 virtual void InitializeExtensionsService(const FilePath& pref_file, 211 virtual void InitializeExtensionsService(const FilePath& pref_file,
212 const FilePath& extensions_install_dir) { 212 const FilePath& extensions_install_dir) {
213 prefs_.reset(new PrefService(pref_file, NULL)); 213 prefs_.reset(new PrefService(pref_file));
214 profile_.reset(new TestingProfile()); 214 profile_.reset(new TestingProfile());
215 service_ = new ExtensionsService(profile_.get(), 215 service_ = new ExtensionsService(profile_.get(),
216 CommandLine::ForCurrentProcess(), 216 CommandLine::ForCurrentProcess(),
217 prefs_.get(), 217 prefs_.get(),
218 extensions_install_dir, 218 extensions_install_dir,
219 false); 219 false);
220 service_->set_extensions_enabled(true); 220 service_->set_extensions_enabled(true);
221 service_->set_show_extensions_prompts(false); 221 service_->set_show_extensions_prompts(false);
222 222
223 // When we start up, we want to make sure there is no external provider, 223 // When we start up, we want to make sure there is no external provider,
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 1567
1568 recorder.set_ready(false); 1568 recorder.set_ready(false);
1569 command_line.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY)); 1569 command_line.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY));
1570 service = new ExtensionsService(&profile, command_line.get(), 1570 service = new ExtensionsService(&profile, command_line.get(),
1571 profile.GetPrefs(), install_dir, false); 1571 profile.GetPrefs(), install_dir, false);
1572 EXPECT_FALSE(service->extensions_enabled()); 1572 EXPECT_FALSE(service->extensions_enabled());
1573 service->Init(); 1573 service->Init();
1574 loop.RunAllPending(); 1574 loop.RunAllPending();
1575 EXPECT_TRUE(recorder.ready()); 1575 EXPECT_TRUE(recorder.ready());
1576 } 1576 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_updater_unittest.cc ('k') | chrome/browser/gtk/bookmark_bar_gtk_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698