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

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

Issue 7248038: Profiles: Make NTPResourceCache a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add files Created 9 years, 5 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
« no previous file with comments | « chrome/test/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/testing_profile.h" 5 #include "chrome/test/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 25 matching lines...) Expand all
36 #include "chrome/browser/prerender/prerender_manager.h" 36 #include "chrome/browser/prerender/prerender_manager.h"
37 #include "chrome/browser/profiles/profile_dependency_manager.h" 37 #include "chrome/browser/profiles/profile_dependency_manager.h"
38 #include "chrome/browser/search_engines/template_url_fetcher.h" 38 #include "chrome/browser/search_engines/template_url_fetcher.h"
39 #include "chrome/browser/search_engines/template_url_service.h" 39 #include "chrome/browser/search_engines/template_url_service.h"
40 #include "chrome/browser/search_engines/template_url_service_factory.h" 40 #include "chrome/browser/search_engines/template_url_service_factory.h"
41 #include "chrome/browser/sessions/session_service_factory.h" 41 #include "chrome/browser/sessions/session_service_factory.h"
42 #include "chrome/browser/sessions/tab_restore_service_factory.h" 42 #include "chrome/browser/sessions/tab_restore_service_factory.h"
43 #include "chrome/browser/sync/profile_sync_service_mock.h" 43 #include "chrome/browser/sync/profile_sync_service_mock.h"
44 #include "chrome/browser/ui/find_bar/find_bar_state.h" 44 #include "chrome/browser/ui/find_bar/find_bar_state.h"
45 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 45 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
46 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
47 #include "chrome/common/chrome_constants.h" 46 #include "chrome/common/chrome_constants.h"
48 #include "chrome/common/url_constants.h" 47 #include "chrome/common/url_constants.h"
49 #include "chrome/test/bookmark_load_observer.h" 48 #include "chrome/test/bookmark_load_observer.h"
50 #include "chrome/test/test_url_request_context_getter.h" 49 #include "chrome/test/test_url_request_context_getter.h"
51 #include "chrome/test/testing_pref_service.h" 50 #include "chrome/test/testing_pref_service.h"
52 #include "chrome/test/ui_test_utils.h" 51 #include "chrome/test/ui_test_utils.h"
53 #include "content/browser/browser_thread.h" 52 #include "content/browser/browser_thread.h"
54 #include "content/browser/in_process_webkit/webkit_context.h" 53 #include "content/browser/in_process_webkit/webkit_context.h"
55 #include "content/browser/mock_resource_context.h" 54 #include "content/browser/mock_resource_context.h"
56 #include "content/common/notification_service.h" 55 #include "content/common/notification_service.h"
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 GetExtensionSpecialStoragePolicy(), 683 GetExtensionSpecialStoragePolicy(),
685 false, NULL, NULL); 684 false, NULL, NULL);
686 } 685 }
687 return webkit_context_; 686 return webkit_context_;
688 } 687 }
689 688
690 WebKitContext* TestingProfile::GetOffTheRecordWebKitContext() { 689 WebKitContext* TestingProfile::GetOffTheRecordWebKitContext() {
691 return NULL; 690 return NULL;
692 } 691 }
693 692
694 NTPResourceCache* TestingProfile::GetNTPResourceCache() {
695 if (!ntp_resource_cache_.get())
696 ntp_resource_cache_.reset(new NTPResourceCache(this));
697 return ntp_resource_cache_.get();
698 }
699
700 FilePath TestingProfile::last_selected_directory() { 693 FilePath TestingProfile::last_selected_directory() {
701 return last_selected_directory_; 694 return last_selected_directory_;
702 } 695 }
703 696
704 void TestingProfile::set_last_selected_directory(const FilePath& path) { 697 void TestingProfile::set_last_selected_directory(const FilePath& path) {
705 last_selected_directory_ = path; 698 last_selected_directory_ = path;
706 } 699 }
707 700
708 PrefProxyConfigTracker* TestingProfile::GetProxyConfigTracker() { 701 PrefProxyConfigTracker* TestingProfile::GetProxyConfigTracker() {
709 if (!pref_proxy_config_tracker_) 702 if (!pref_proxy_config_tracker_)
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 } 785 }
793 786
794 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) 787 DerivedTestingProfile::DerivedTestingProfile(Profile* profile)
795 : original_profile_(profile) {} 788 : original_profile_(profile) {}
796 789
797 DerivedTestingProfile::~DerivedTestingProfile() {} 790 DerivedTestingProfile::~DerivedTestingProfile() {}
798 791
799 ProfileId DerivedTestingProfile::GetRuntimeId() { 792 ProfileId DerivedTestingProfile::GetRuntimeId() {
800 return original_profile_->GetRuntimeId(); 793 return original_profile_->GetRuntimeId();
801 } 794 }
OLDNEW
« no previous file with comments | « chrome/test/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698