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

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 8333021: Fix a crash in PageActionImageView when extensions are reloaded due to incognito settings changing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | no next file » | 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) 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/test/base/testing_profile.h" 5 #include "chrome/test/base/testing_profile.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 338
339 static ProfileKeyedService* BuildTemplateURLService(Profile* profile) { 339 static ProfileKeyedService* BuildTemplateURLService(Profile* profile) {
340 return new TemplateURLService(profile); 340 return new TemplateURLService(profile);
341 } 341 }
342 342
343 void TestingProfile::CreateTemplateURLService() { 343 void TestingProfile::CreateTemplateURLService() {
344 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse( 344 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse(
345 this, BuildTemplateURLService); 345 this, BuildTemplateURLService);
346 } 346 }
347 347
348 void TestingProfile::CreateExtensionProcessManager() {
349 extension_process_manager_.reset(ExtensionProcessManager::Create(this));
350 }
351
348 ExtensionService* TestingProfile::CreateExtensionService( 352 ExtensionService* TestingProfile::CreateExtensionService(
349 const CommandLine* command_line, 353 const CommandLine* command_line,
350 const FilePath& install_directory, 354 const FilePath& install_directory,
351 bool autoupdate_enabled) { 355 bool autoupdate_enabled) {
352 // Extension pref store, created for use by |extension_prefs_|. 356 // Extension pref store, created for use by |extension_prefs_|.
353 357
354 extension_pref_value_map_.reset(new ExtensionPrefValueMap); 358 extension_pref_value_map_.reset(new ExtensionPrefValueMap);
355 359
356 bool extensions_disabled = 360 bool extensions_disabled =
357 command_line && command_line->HasSwitch(switches::kDisableExtensions); 361 command_line && command_line->HasSwitch(switches::kDisableExtensions);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 445
442 UserScriptMaster* TestingProfile::GetUserScriptMaster() { 446 UserScriptMaster* TestingProfile::GetUserScriptMaster() {
443 return NULL; 447 return NULL;
444 } 448 }
445 449
446 ExtensionDevToolsManager* TestingProfile::GetExtensionDevToolsManager() { 450 ExtensionDevToolsManager* TestingProfile::GetExtensionDevToolsManager() {
447 return NULL; 451 return NULL;
448 } 452 }
449 453
450 ExtensionProcessManager* TestingProfile::GetExtensionProcessManager() { 454 ExtensionProcessManager* TestingProfile::GetExtensionProcessManager() {
451 return NULL; 455 return extension_process_manager_.get();
452 } 456 }
453 457
454 ExtensionMessageService* TestingProfile::GetExtensionMessageService() { 458 ExtensionMessageService* TestingProfile::GetExtensionMessageService() {
455 return NULL; 459 return NULL;
456 } 460 }
457 461
458 ExtensionEventRouter* TestingProfile::GetExtensionEventRouter() { 462 ExtensionEventRouter* TestingProfile::GetExtensionEventRouter() {
459 return NULL; 463 return NULL;
460 } 464 }
461 465
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { 805 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() {
802 return GetExtensionSpecialStoragePolicy(); 806 return GetExtensionSpecialStoragePolicy();
803 } 807 }
804 808
805 void TestingProfile::DestroyWebDataService() { 809 void TestingProfile::DestroyWebDataService() {
806 if (!web_data_service_.get()) 810 if (!web_data_service_.get())
807 return; 811 return;
808 812
809 web_data_service_->Shutdown(); 813 web_data_service_->Shutdown();
810 } 814 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698