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

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

Issue 5430004: Refactored cookies persistent store clean-up on shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Lock protected the clear on exit flag. Created 10 years 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 | « no previous file | chrome/browser/net/chrome_url_request_context.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "app/clipboard/clipboard.h" 9 #include "app/clipboard/clipboard.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 17 matching lines...) Expand all
28 #include "chrome/browser/download/save_file_manager.h" 28 #include "chrome/browser/download/save_file_manager.h"
29 #include "chrome/browser/first_run/first_run.h" 29 #include "chrome/browser/first_run/first_run.h"
30 #include "chrome/browser/google/google_url_tracker.h" 30 #include "chrome/browser/google/google_url_tracker.h"
31 #include "chrome/browser/icon_manager.h" 31 #include "chrome/browser/icon_manager.h"
32 #include "chrome/browser/intranet_redirect_detector.h" 32 #include "chrome/browser/intranet_redirect_detector.h"
33 #include "chrome/browser/io_thread.h" 33 #include "chrome/browser/io_thread.h"
34 #include "chrome/browser/metrics/metrics_service.h" 34 #include "chrome/browser/metrics/metrics_service.h"
35 #include "chrome/browser/net/chrome_net_log.h" 35 #include "chrome/browser/net/chrome_net_log.h"
36 #include "chrome/browser/net/predictor_api.h" 36 #include "chrome/browser/net/predictor_api.h"
37 #include "chrome/browser/net/sdch_dictionary_fetcher.h" 37 #include "chrome/browser/net/sdch_dictionary_fetcher.h"
38 #include "chrome/browser/net/sqlite_persistent_cookie_store.h"
39 #include "chrome/browser/notifications/notification_ui_manager.h" 38 #include "chrome/browser/notifications/notification_ui_manager.h"
40 #include "chrome/browser/plugin_service.h" 39 #include "chrome/browser/plugin_service.h"
41 #include "chrome/browser/plugin_updater.h" 40 #include "chrome/browser/plugin_updater.h"
42 #include "chrome/browser/prefs/pref_service.h" 41 #include "chrome/browser/prefs/pref_service.h"
43 #include "chrome/browser/printing/print_job_manager.h" 42 #include "chrome/browser/printing/print_job_manager.h"
44 #include "chrome/browser/printing/print_preview_tab_controller.h" 43 #include "chrome/browser/printing/print_preview_tab_controller.h"
45 #include "chrome/browser/profiles/profile_manager.h" 44 #include "chrome/browser/profiles/profile_manager.h"
46 #include "chrome/browser/renderer_host/render_process_host.h" 45 #include "chrome/browser/renderer_host/render_process_host.h"
47 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" 46 #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
48 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 47 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 this, 496 this,
498 &BrowserProcessImpl::OnAutoupdateTimer); 497 &BrowserProcessImpl::OnAutoupdateTimer);
499 } 498 }
500 #endif 499 #endif
501 500
502 bool BrowserProcessImpl::have_inspector_files() const { 501 bool BrowserProcessImpl::have_inspector_files() const {
503 return have_inspector_files_; 502 return have_inspector_files_;
504 } 503 }
505 504
506 void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) { 505 void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) {
507 SQLitePersistentCookieStore::ClearLocalState(profile_path.Append(
508 chrome::kCookieFilename));
509 webkit_database::DatabaseTracker::ClearLocalState(profile_path); 506 webkit_database::DatabaseTracker::ClearLocalState(profile_path);
510 ChromeAppCacheService::ClearLocalState(profile_path); 507 ChromeAppCacheService::ClearLocalState(profile_path);
511 } 508 }
512 509
513 bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) { 510 bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) {
514 FilePath user_data_dir; 511 FilePath user_data_dir;
515 Profile* profile; 512 Profile* profile;
516 513
517 // Check for the existence of a profile manager. When quitting early, 514 // Check for the existence of a profile manager. When quitting early,
518 // e.g. because another chrome instance is running, or when invoked with 515 // e.g. because another chrome instance is running, or when invoked with
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 } 816 }
820 817
821 void BrowserProcessImpl::OnAutoupdateTimer() { 818 void BrowserProcessImpl::OnAutoupdateTimer() {
822 if (CanAutorestartForUpdate()) { 819 if (CanAutorestartForUpdate()) {
823 DLOG(WARNING) << "Detected update. Restarting browser."; 820 DLOG(WARNING) << "Detected update. Restarting browser.";
824 RestartPersistentInstance(); 821 RestartPersistentInstance();
825 } 822 }
826 } 823 }
827 824
828 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 825 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/chrome_url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698