OLD | NEW |
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 12 matching lines...) Expand all Loading... |
23 #include "chrome/browser/browser_thread.h" | 23 #include "chrome/browser/browser_thread.h" |
24 #include "chrome/browser/browser_trial.h" | 24 #include "chrome/browser/browser_trial.h" |
25 #include "chrome/browser/debugger/debugger_wrapper.h" | 25 #include "chrome/browser/debugger/debugger_wrapper.h" |
26 #include "chrome/browser/debugger/devtools_manager.h" | 26 #include "chrome/browser/debugger/devtools_manager.h" |
27 #include "chrome/browser/download/download_file_manager.h" | 27 #include "chrome/browser/download/download_file_manager.h" |
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/in_process_webkit/indexed_db_context.h" | |
34 #include "chrome/browser/intranet_redirect_detector.h" | 33 #include "chrome/browser/intranet_redirect_detector.h" |
35 #include "chrome/browser/io_thread.h" | 34 #include "chrome/browser/io_thread.h" |
36 #include "chrome/browser/metrics/metrics_service.h" | 35 #include "chrome/browser/metrics/metrics_service.h" |
37 #include "chrome/browser/net/predictor_api.h" | 36 #include "chrome/browser/net/predictor_api.h" |
38 #include "chrome/browser/net/sdch_dictionary_fetcher.h" | 37 #include "chrome/browser/net/sdch_dictionary_fetcher.h" |
39 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" | 38 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" |
40 #include "chrome/browser/notifications/notification_ui_manager.h" | 39 #include "chrome/browser/notifications/notification_ui_manager.h" |
41 #include "chrome/browser/plugin_service.h" | 40 #include "chrome/browser/plugin_service.h" |
42 #include "chrome/browser/plugin_updater.h" | 41 #include "chrome/browser/plugin_updater.h" |
43 #include "chrome/browser/prefs/pref_service.h" | 42 #include "chrome/browser/prefs/pref_service.h" |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 #endif | 498 #endif |
500 | 499 |
501 bool BrowserProcessImpl::have_inspector_files() const { | 500 bool BrowserProcessImpl::have_inspector_files() const { |
502 return have_inspector_files_; | 501 return have_inspector_files_; |
503 } | 502 } |
504 | 503 |
505 void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) { | 504 void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) { |
506 SQLitePersistentCookieStore::ClearLocalState(profile_path.Append( | 505 SQLitePersistentCookieStore::ClearLocalState(profile_path.Append( |
507 chrome::kCookieFilename)); | 506 chrome::kCookieFilename)); |
508 DOMStorageContext::ClearLocalState(profile_path, chrome::kExtensionScheme); | 507 DOMStorageContext::ClearLocalState(profile_path, chrome::kExtensionScheme); |
509 IndexedDBContext::ClearLocalState(profile_path, chrome::kExtensionScheme); | |
510 webkit_database::DatabaseTracker::ClearLocalState(profile_path); | 508 webkit_database::DatabaseTracker::ClearLocalState(profile_path); |
511 ChromeAppCacheService::ClearLocalState(profile_path); | 509 ChromeAppCacheService::ClearLocalState(profile_path); |
512 } | 510 } |
513 | 511 |
514 bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) { | 512 bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) { |
515 FilePath user_data_dir; | 513 FilePath user_data_dir; |
516 Profile* profile; | 514 Profile* profile; |
517 | 515 |
518 // Check for the existence of a profile manager. When quitting early, | 516 // Check for the existence of a profile manager. When quitting early, |
519 // e.g. because another chrome instance is running, or when invoked with | 517 // e.g. because another chrome instance is running, or when invoked with |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 } | 818 } |
821 | 819 |
822 void BrowserProcessImpl::OnAutoupdateTimer() { | 820 void BrowserProcessImpl::OnAutoupdateTimer() { |
823 if (CanAutorestartForUpdate()) { | 821 if (CanAutorestartForUpdate()) { |
824 DLOG(WARNING) << "Detected update. Restarting browser."; | 822 DLOG(WARNING) << "Detected update. Restarting browser."; |
825 RestartPersistentInstance(); | 823 RestartPersistentInstance(); |
826 } | 824 } |
827 } | 825 } |
828 | 826 |
829 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 827 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |