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