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

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

Issue 119256: Fix user scripts not getting initialized. (Closed)
Patch Set: Fix unit tests Created 11 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
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.cc ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_TEST_TESTING_PROFILE_H_ 5 #ifndef CHROME_TEST_TESTING_PROFILE_H_
6 #define CHROME_TEST_TESTING_PROFILE_H_ 6 #define CHROME_TEST_TESTING_PROFILE_H_
7 7
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void set_has_history_service(bool has_history_service) { 99 void set_has_history_service(bool has_history_service) {
100 has_history_service_ = has_history_service; 100 has_history_service_ = has_history_service;
101 } 101 }
102 virtual WebDataService* GetWebDataService(ServiceAccessType access) { 102 virtual WebDataService* GetWebDataService(ServiceAccessType access) {
103 return NULL; 103 return NULL;
104 } 104 }
105 virtual PasswordStore* GetPasswordStore(ServiceAccessType access) { 105 virtual PasswordStore* GetPasswordStore(ServiceAccessType access) {
106 return NULL; 106 return NULL;
107 } 107 }
108 virtual PrefService* GetPrefs() { 108 virtual PrefService* GetPrefs() {
109 FilePath prefs_filename;
110 PathService::Get(base::DIR_TEMP, &prefs_filename);
111 prefs_filename =
112 prefs_filename.Append(FILE_PATH_LITERAL("TestPreferences"));
113 if (!prefs_.get()) { 109 if (!prefs_.get()) {
110 FilePath prefs_filename =
111 path_.Append(FILE_PATH_LITERAL("TestPreferences"));
114 prefs_.reset(new PrefService(prefs_filename, NULL)); 112 prefs_.reset(new PrefService(prefs_filename, NULL));
115 Profile::RegisterUserPrefs(prefs_.get()); 113 Profile::RegisterUserPrefs(prefs_.get());
116 browser::RegisterAllPrefs(prefs_.get(), prefs_.get()); 114 browser::RegisterAllPrefs(prefs_.get(), prefs_.get());
117 } 115 }
118 return prefs_.get(); 116 return prefs_.get();
119 } 117 }
120 virtual TemplateURLModel* GetTemplateURLModel() { 118 virtual TemplateURLModel* GetTemplateURLModel() {
121 return template_url_model_.get(); 119 return template_url_model_.get();
122 } 120 }
123 virtual TemplateURLFetcher* GetTemplateURLFetcher() { 121 virtual TemplateURLFetcher* GetTemplateURLFetcher() {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 245
248 std::wstring id_; 246 std::wstring id_;
249 247
250 bool off_the_record_; 248 bool off_the_record_;
251 249
252 // Did the last session exit cleanly? Default is true. 250 // Did the last session exit cleanly? Default is true.
253 bool last_session_exited_cleanly_; 251 bool last_session_exited_cleanly_;
254 }; 252 };
255 253
256 #endif // CHROME_TEST_TESTING_PROFILE_H_ 254 #endif // CHROME_TEST_TESTING_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698