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/test/base/testing_profile.cc

Issue 10546083: Convert ProtocolHandlerRegistry to be a ProfileKeyedService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Respond to review comments. Fit and finish. Created 8 years, 6 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
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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 bookmark_service; 354 bookmark_service;
355 history_service->history_backend_->expirer_.bookmark_service_ = 355 history_service->history_backend_->expirer_.bookmark_service_ =
356 bookmark_service; 356 bookmark_service;
357 } 357 }
358 } 358 }
359 359
360 void TestingProfile::CreateAutocompleteClassifier() { 360 void TestingProfile::CreateAutocompleteClassifier() {
361 autocomplete_classifier_.reset(new AutocompleteClassifier(this)); 361 autocomplete_classifier_.reset(new AutocompleteClassifier(this));
362 } 362 }
363 363
364 void TestingProfile::CreateProtocolHandlerRegistry() {
365 protocol_handler_registry_ = new ProtocolHandlerRegistry(this,
366 new ProtocolHandlerRegistry::Delegate());
367 }
368
369 static scoped_refptr<RefcountedProfileKeyedService> BuildWebDataService( 364 static scoped_refptr<RefcountedProfileKeyedService> BuildWebDataService(
370 Profile* profile) { 365 Profile* profile) {
371 WebDataService* web_data_service = new WebDataService(); 366 WebDataService* web_data_service = new WebDataService();
372 if (web_data_service) 367 if (web_data_service)
373 web_data_service->Init(profile->GetPath()); 368 web_data_service->Init(profile->GetPath());
374 return web_data_service; 369 return web_data_service;
375 } 370 }
376 371
377 void TestingProfile::CreateWebDataService() { 372 void TestingProfile::CreateWebDataService() {
378 WebDataServiceFactory::GetInstance()->SetTestingFactory( 373 WebDataServiceFactory::GetInstance()->SetTestingFactory(
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 678
684 bool TestingProfile::IsSameProfile(Profile *p) { 679 bool TestingProfile::IsSameProfile(Profile *p) {
685 return this == p; 680 return this == p;
686 } 681 }
687 682
688 base::Time TestingProfile::GetStartTime() const { 683 base::Time TestingProfile::GetStartTime() const {
689 return start_time_; 684 return start_time_;
690 } 685 }
691 686
692 ProtocolHandlerRegistry* TestingProfile::GetProtocolHandlerRegistry() { 687 ProtocolHandlerRegistry* TestingProfile::GetProtocolHandlerRegistry() {
693 return protocol_handler_registry_.get(); 688 return NULL;
694 } 689 }
695 690
696 FilePath TestingProfile::last_selected_directory() { 691 FilePath TestingProfile::last_selected_directory() {
697 return last_selected_directory_; 692 return last_selected_directory_;
698 } 693 }
699 694
700 void TestingProfile::set_last_selected_directory(const FilePath& path) { 695 void TestingProfile::set_last_selected_directory(const FilePath& path) {
701 last_selected_directory_ = path; 696 last_selected_directory_ = path;
702 } 697 }
703 698
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 } 736 }
742 737
743 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { 738 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) {
744 return true; 739 return true;
745 } 740 }
746 741
747 base::Callback<ChromeURLDataManagerBackend*(void)> 742 base::Callback<ChromeURLDataManagerBackend*(void)>
748 TestingProfile::GetChromeURLDataManagerBackendGetter() const { 743 TestingProfile::GetChromeURLDataManagerBackendGetter() const {
749 return base::Callback<ChromeURLDataManagerBackend*(void)>(); 744 return base::Callback<ChromeURLDataManagerBackend*(void)>();
750 } 745 }
OLDNEW
« chrome/browser/profiles/profile_impl.cc ('K') | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698