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

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

Issue 9977021: Add ExtensionSytem::Get(Profile*) as a wrapper around (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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/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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 433
434 VisitedLinkMaster* TestingProfile::GetVisitedLinkMaster() { 434 VisitedLinkMaster* TestingProfile::GetVisitedLinkMaster() {
435 return NULL; 435 return NULL;
436 } 436 }
437 437
438 ExtensionPrefValueMap* TestingProfile::GetExtensionPrefValueMap() { 438 ExtensionPrefValueMap* TestingProfile::GetExtensionPrefValueMap() {
439 return NULL; 439 return NULL;
440 } 440 }
441 441
442 ExtensionService* TestingProfile::GetExtensionService() { 442 ExtensionService* TestingProfile::GetExtensionService() {
443 return ExtensionSystemFactory::GetForProfile(this)->extension_service(); 443 return ExtensionSystem::Get(this)->extension_service();
444 } 444 }
445 445
446 UserScriptMaster* TestingProfile::GetUserScriptMaster() { 446 UserScriptMaster* TestingProfile::GetUserScriptMaster() {
447 return ExtensionSystemFactory::GetForProfile(this)->user_script_master(); 447 return ExtensionSystem::Get(this)->user_script_master();
448 } 448 }
449 449
450 ExtensionProcessManager* TestingProfile::GetExtensionProcessManager() { 450 ExtensionProcessManager* TestingProfile::GetExtensionProcessManager() {
451 return ExtensionSystemFactory::GetForProfile(this)->process_manager(); 451 return ExtensionSystem::Get(this)->process_manager();
452 } 452 }
453 453
454 ExtensionEventRouter* TestingProfile::GetExtensionEventRouter() { 454 ExtensionEventRouter* TestingProfile::GetExtensionEventRouter() {
455 return ExtensionSystemFactory::GetForProfile(this)->event_router(); 455 return ExtensionSystem::Get(this)->event_router();
456 } 456 }
457 457
458 void TestingProfile::SetExtensionSpecialStoragePolicy( 458 void TestingProfile::SetExtensionSpecialStoragePolicy(
459 ExtensionSpecialStoragePolicy* extension_special_storage_policy) { 459 ExtensionSpecialStoragePolicy* extension_special_storage_policy) {
460 extension_special_storage_policy_ = extension_special_storage_policy; 460 extension_special_storage_policy_ = extension_special_storage_policy;
461 } 461 }
462 462
463 ExtensionSpecialStoragePolicy* 463 ExtensionSpecialStoragePolicy*
464 TestingProfile::GetExtensionSpecialStoragePolicy() { 464 TestingProfile::GetExtensionSpecialStoragePolicy() {
465 if (!extension_special_storage_policy_.get()) 465 if (!extension_special_storage_policy_.get())
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 return NULL; 541 return NULL;
542 } 542 }
543 543
544 net::URLRequestContextGetter* TestingProfile::GetRequestContext() { 544 net::URLRequestContextGetter* TestingProfile::GetRequestContext() {
545 return request_context_.get(); 545 return request_context_.get();
546 } 546 }
547 547
548 net::URLRequestContextGetter* TestingProfile::GetRequestContextForRenderProcess( 548 net::URLRequestContextGetter* TestingProfile::GetRequestContextForRenderProcess(
549 int renderer_child_id) { 549 int renderer_child_id) {
550 ExtensionService* extension_service = 550 ExtensionService* extension_service =
551 ExtensionSystemFactory::GetForProfile(this)->extension_service(); 551 ExtensionSystem::Get(this)->extension_service();
552 if (extension_service) { 552 if (extension_service) {
553 const Extension* installed_app = extension_service-> 553 const Extension* installed_app = extension_service->
554 GetInstalledAppForRenderer(renderer_child_id); 554 GetInstalledAppForRenderer(renderer_child_id);
555 if (installed_app != NULL && installed_app->is_storage_isolated()) 555 if (installed_app != NULL && installed_app->is_storage_isolated())
556 return GetRequestContextForIsolatedApp(installed_app->id()); 556 return GetRequestContextForIsolatedApp(installed_app->id());
557 } 557 }
558 558
559 return GetRequestContext(); 559 return GetRequestContext();
560 } 560 }
561 561
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 void TestingProfile::DestroyWebDataService() { 722 void TestingProfile::DestroyWebDataService() {
723 if (!web_data_service_.get()) 723 if (!web_data_service_.get())
724 return; 724 return;
725 725
726 web_data_service_->Shutdown(); 726 web_data_service_->Shutdown();
727 } 727 }
728 728
729 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { 729 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) {
730 return true; 730 return true;
731 } 731 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698