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

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

Issue 340067: database_dispatcher_host changes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Addressed Michael's latest comments. Created 11 years, 1 month 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/browser/renderer_host/browser_render_process_host.cc » ('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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "chrome/common/appcache/chrome_appcache_service.h" 48 #include "chrome/common/appcache/chrome_appcache_service.h"
49 #include "chrome/common/chrome_constants.h" 49 #include "chrome/common/chrome_constants.h"
50 #include "chrome/common/chrome_paths.h" 50 #include "chrome/common/chrome_paths.h"
51 #include "chrome/common/chrome_switches.h" 51 #include "chrome/common/chrome_switches.h"
52 #include "chrome/common/extensions/extension_error_reporter.h" 52 #include "chrome/common/extensions/extension_error_reporter.h"
53 #include "chrome/common/notification_service.h" 53 #include "chrome/common/notification_service.h"
54 #include "chrome/common/pref_names.h" 54 #include "chrome/common/pref_names.h"
55 #include "chrome/common/render_messages.h" 55 #include "chrome/common/render_messages.h"
56 #include "grit/locale_settings.h" 56 #include "grit/locale_settings.h"
57 #include "net/base/strict_transport_security_state.h" 57 #include "net/base/strict_transport_security_state.h"
58 #include "webkit/database/database_tracker.h"
58 59
59 #if defined(OS_LINUX) 60 #if defined(OS_LINUX)
60 #include "net/ocsp/nss_ocsp.h" 61 #include "net/ocsp/nss_ocsp.h"
61 #include "chrome/browser/gtk/gtk_theme_provider.h" 62 #include "chrome/browser/gtk/gtk_theme_provider.h"
62 #endif 63 #endif
63 64
64 #if defined(OS_CHROMEOS) 65 #if defined(OS_CHROMEOS)
65 #include "chrome/browser/chromeos/preferences.h" 66 #include "chrome/browser/chromeos/preferences.h"
66 #endif 67 #endif
67 68
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 231
231 virtual void DestroyOffTheRecordProfile() { 232 virtual void DestroyOffTheRecordProfile() {
232 // Suicide is bad! 233 // Suicide is bad!
233 NOTREACHED(); 234 NOTREACHED();
234 } 235 }
235 236
236 virtual Profile* GetOriginalProfile() { 237 virtual Profile* GetOriginalProfile() {
237 return profile_; 238 return profile_;
238 } 239 }
239 240
241 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() {
242 if (!db_tracker_)
243 db_tracker_ = new webkit_database::DatabaseTracker(FilePath());
244 return db_tracker_;
245 }
246
240 virtual VisitedLinkMaster* GetVisitedLinkMaster() { 247 virtual VisitedLinkMaster* GetVisitedLinkMaster() {
241 // We don't provide access to the VisitedLinkMaster when we're OffTheRecord 248 // We don't provide access to the VisitedLinkMaster when we're OffTheRecord
242 // because we don't want to leak the sites that the user has visited before. 249 // because we don't want to leak the sites that the user has visited before.
243 return NULL; 250 return NULL;
244 } 251 }
245 252
246 virtual ExtensionsService* GetExtensionsService() { 253 virtual ExtensionsService* GetExtensionsService() {
247 return NULL; 254 return NULL;
248 } 255 }
249 256
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 // the user visited while OTR. 565 // the user visited while OTR.
559 scoped_ptr<SSLHostState> ssl_host_state_; 566 scoped_ptr<SSLHostState> ssl_host_state_;
560 567
561 // The StrictTransportSecurityState that only stores enabled sites in memory. 568 // The StrictTransportSecurityState that only stores enabled sites in memory.
562 scoped_refptr<net::StrictTransportSecurityState> 569 scoped_refptr<net::StrictTransportSecurityState>
563 strict_transport_security_state_; 570 strict_transport_security_state_;
564 571
565 // Time we were started. 572 // Time we were started.
566 Time start_time_; 573 Time start_time_;
567 574
575 // The main database tracker for this profile.
576 // Should be used only on the file thread.
577 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
578
568 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); 579 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl);
569 }; 580 };
570 581
571 ProfileImpl::ProfileImpl(const FilePath& path) 582 ProfileImpl::ProfileImpl(const FilePath& path)
572 : path_(path), 583 : path_(path),
573 visited_link_event_listener_(new VisitedLinkEventListener()), 584 visited_link_event_listener_(new VisitedLinkEventListener()),
574 extension_devtools_manager_(NULL), 585 extension_devtools_manager_(NULL),
575 request_context_(NULL), 586 request_context_(NULL),
576 media_request_context_(NULL), 587 media_request_context_(NULL),
577 extensions_request_context_(NULL), 588 extensions_request_context_(NULL),
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 } 834 }
824 835
825 void ProfileImpl::DestroyOffTheRecordProfile() { 836 void ProfileImpl::DestroyOffTheRecordProfile() {
826 off_the_record_profile_.reset(); 837 off_the_record_profile_.reset();
827 } 838 }
828 839
829 Profile* ProfileImpl::GetOriginalProfile() { 840 Profile* ProfileImpl::GetOriginalProfile() {
830 return this; 841 return this;
831 } 842 }
832 843
844 webkit_database::DatabaseTracker* ProfileImpl::GetDatabaseTracker() {
845 if (!db_tracker_)
846 db_tracker_ = new webkit_database::DatabaseTracker(GetPath());
847 return db_tracker_;
848 }
849
833 VisitedLinkMaster* ProfileImpl::GetVisitedLinkMaster() { 850 VisitedLinkMaster* ProfileImpl::GetVisitedLinkMaster() {
834 if (!visited_link_master_.get()) { 851 if (!visited_link_master_.get()) {
835 scoped_ptr<VisitedLinkMaster> visited_links( 852 scoped_ptr<VisitedLinkMaster> visited_links(
836 new VisitedLinkMaster(visited_link_event_listener_.get(), this)); 853 new VisitedLinkMaster(visited_link_event_listener_.get(), this));
837 if (!visited_links->Init()) 854 if (!visited_links->Init())
838 return NULL; 855 return NULL;
839 visited_link_master_.swap(visited_links); 856 visited_link_master_.swap(visited_links);
840 } 857 }
841 858
842 return visited_link_master_.get(); 859 return visited_link_master_.get();
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 return sync_service_.get(); 1446 return sync_service_.get();
1430 } 1447 }
1431 #endif 1448 #endif
1432 return NULL; 1449 return NULL;
1433 } 1450 }
1434 1451
1435 void ProfileImpl::InitSyncService() { 1452 void ProfileImpl::InitSyncService() {
1436 sync_service_.reset(new ProfileSyncService(this)); 1453 sync_service_.reset(new ProfileSyncService(this));
1437 sync_service_->Initialize(); 1454 sync_service_->Initialize();
1438 } 1455 }
OLDNEW
« no previous file with comments | « chrome/browser/profile.h ('k') | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698