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

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: Added unit test and moved flag to the persistence store itself. 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
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/in_process_webkit/dom_storage_context.h" 32 #include "chrome/browser/in_process_webkit/dom_storage_context.h"
33 #include "chrome/browser/intranet_redirect_detector.h" 33 #include "chrome/browser/intranet_redirect_detector.h"
34 #include "chrome/browser/io_thread.h" 34 #include "chrome/browser/io_thread.h"
35 #include "chrome/browser/metrics/metrics_service.h" 35 #include "chrome/browser/metrics/metrics_service.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/profile_manager.h" 44 #include "chrome/browser/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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 this, 494 this,
496 &BrowserProcessImpl::OnAutoupdateTimer); 495 &BrowserProcessImpl::OnAutoupdateTimer);
497 } 496 }
498 #endif 497 #endif
499 498
500 bool BrowserProcessImpl::have_inspector_files() const { 499 bool BrowserProcessImpl::have_inspector_files() const {
501 return have_inspector_files_; 500 return have_inspector_files_;
502 } 501 }
503 502
504 void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) { 503 void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) {
505 SQLitePersistentCookieStore::ClearLocalState(profile_path.Append(
506 chrome::kCookieFilename));
507 DOMStorageContext::ClearLocalState(profile_path, chrome::kExtensionScheme); 504 DOMStorageContext::ClearLocalState(profile_path, chrome::kExtensionScheme);
508 webkit_database::DatabaseTracker::ClearLocalState(profile_path); 505 webkit_database::DatabaseTracker::ClearLocalState(profile_path);
509 ChromeAppCacheService::ClearLocalState(profile_path); 506 ChromeAppCacheService::ClearLocalState(profile_path);
510 } 507 }
511 508
512 bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) { 509 bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) {
513 FilePath user_data_dir; 510 FilePath user_data_dir;
514 Profile* profile; 511 Profile* profile;
515 512
516 // Check for the existence of a profile manager. When quitting early, 513 // Check for the existence of a profile manager. When quitting early,
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 } 815 }
819 816
820 void BrowserProcessImpl::OnAutoupdateTimer() { 817 void BrowserProcessImpl::OnAutoupdateTimer() {
821 if (CanAutorestartForUpdate()) { 818 if (CanAutorestartForUpdate()) {
822 DLOG(WARNING) << "Detected update. Restarting browser."; 819 DLOG(WARNING) << "Detected update. Restarting browser.";
823 RestartPersistentInstance(); 820 RestartPersistentInstance();
824 } 821 }
825 } 822 }
826 823
827 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 824 #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') | chrome/browser/net/chrome_url_request_context.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698