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

Side by Side Diff: chrome/browser/profile.cc

Issue 267019: Add the ability to unload the HistoryBackend.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/browser/profile.h ('k') | chrome/test/testing_profile.h » ('j') | 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 #include "chrome/browser/profile.h" 5 #include "chrome/browser/profile.h"
6 6
7 #include "app/theme_provider.h" 7 #include "app/theme_provider.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 virtual HistoryService* GetHistoryService(ServiceAccessType sat) { 299 virtual HistoryService* GetHistoryService(ServiceAccessType sat) {
300 if (sat == EXPLICIT_ACCESS) { 300 if (sat == EXPLICIT_ACCESS) {
301 return profile_->GetHistoryService(sat); 301 return profile_->GetHistoryService(sat);
302 } else { 302 } else {
303 NOTREACHED() << "This profile is OffTheRecord"; 303 NOTREACHED() << "This profile is OffTheRecord";
304 return NULL; 304 return NULL;
305 } 305 }
306 } 306 }
307 307
308 virtual HistoryService* GetHistoryServiceWithoutCreating() {
309 return profile_->GetHistoryServiceWithoutCreating();
310 }
311
308 virtual FaviconService* GetFaviconService(ServiceAccessType sat) { 312 virtual FaviconService* GetFaviconService(ServiceAccessType sat) {
309 if (sat == EXPLICIT_ACCESS) { 313 if (sat == EXPLICIT_ACCESS) {
310 return profile_->GetFaviconService(sat); 314 return profile_->GetFaviconService(sat);
311 } else { 315 } else {
312 NOTREACHED() << "This profile is OffTheRecord"; 316 NOTREACHED() << "This profile is OffTheRecord";
313 return NULL; 317 return NULL;
314 } 318 }
315 } 319 }
316 320
317 virtual WebDataService* GetWebDataService(ServiceAccessType sat) { 321 virtual WebDataService* GetWebDataService(ServiceAccessType sat) {
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 history_service_.swap(history); 1013 history_service_.swap(history);
1010 1014
1011 // Send out the notification that the history service was created. 1015 // Send out the notification that the history service was created.
1012 NotificationService::current()-> 1016 NotificationService::current()->
1013 Notify(NotificationType::HISTORY_CREATED, Source<Profile>(this), 1017 Notify(NotificationType::HISTORY_CREATED, Source<Profile>(this),
1014 Details<HistoryService>(history_service_.get())); 1018 Details<HistoryService>(history_service_.get()));
1015 } 1019 }
1016 return history_service_.get(); 1020 return history_service_.get();
1017 } 1021 }
1018 1022
1023 HistoryService* ProfileImpl::GetHistoryServiceWithoutCreating() {
1024 return history_service_.get();
1025 }
1026
1019 TemplateURLModel* ProfileImpl::GetTemplateURLModel() { 1027 TemplateURLModel* ProfileImpl::GetTemplateURLModel() {
1020 if (!template_url_model_.get()) 1028 if (!template_url_model_.get())
1021 template_url_model_.reset(new TemplateURLModel(this)); 1029 template_url_model_.reset(new TemplateURLModel(this));
1022 return template_url_model_.get(); 1030 return template_url_model_.get();
1023 } 1031 }
1024 1032
1025 TemplateURLFetcher* ProfileImpl::GetTemplateURLFetcher() { 1033 TemplateURLFetcher* ProfileImpl::GetTemplateURLFetcher() {
1026 if (!template_url_fetcher_.get()) 1034 if (!template_url_fetcher_.get())
1027 template_url_fetcher_.reset(new TemplateURLFetcher(this)); 1035 template_url_fetcher_.reset(new TemplateURLFetcher(this));
1028 return template_url_fetcher_.get(); 1036 return template_url_fetcher_.get();
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 #endif 1380 #endif
1373 return NULL; 1381 return NULL;
1374 } 1382 }
1375 1383
1376 void ProfileImpl::InitSyncService() { 1384 void ProfileImpl::InitSyncService() {
1377 #ifdef CHROME_PERSONALIZATION 1385 #ifdef CHROME_PERSONALIZATION
1378 sync_service_.reset(new ProfileSyncService(this)); 1386 sync_service_.reset(new ProfileSyncService(this));
1379 sync_service_->Initialize(); 1387 sync_service_->Initialize();
1380 #endif 1388 #endif
1381 } 1389 }
OLDNEW
« no previous file with comments | « chrome/browser/profile.h ('k') | chrome/test/testing_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698