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 17 matching lines...) Expand all Loading... | |
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" | 38 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" |
jochen (gone - plz use gerrit)
2010/12/02 08:45:50
do you still need this?
pastarmovj
2010/12/02 14:54:36
Done.
| |
39 #include "chrome/browser/notifications/notification_ui_manager.h" | 39 #include "chrome/browser/notifications/notification_ui_manager.h" |
40 #include "chrome/browser/plugin_service.h" | 40 #include "chrome/browser/plugin_service.h" |
41 #include "chrome/browser/plugin_updater.h" | 41 #include "chrome/browser/plugin_updater.h" |
42 #include "chrome/browser/prefs/pref_service.h" | 42 #include "chrome/browser/prefs/pref_service.h" |
43 #include "chrome/browser/printing/print_job_manager.h" | 43 #include "chrome/browser/printing/print_job_manager.h" |
44 #include "chrome/browser/printing/print_preview_tab_controller.h" | 44 #include "chrome/browser/printing/print_preview_tab_controller.h" |
45 #include "chrome/browser/profile_manager.h" | 45 #include "chrome/browser/profile_manager.h" |
46 #include "chrome/browser/renderer_host/render_process_host.h" | 46 #include "chrome/browser/renderer_host/render_process_host.h" |
47 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 47 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
48 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 48 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
495 this, | 495 this, |
496 &BrowserProcessImpl::OnAutoupdateTimer); | 496 &BrowserProcessImpl::OnAutoupdateTimer); |
497 } | 497 } |
498 #endif | 498 #endif |
499 | 499 |
500 bool BrowserProcessImpl::have_inspector_files() const { | 500 bool BrowserProcessImpl::have_inspector_files() const { |
501 return have_inspector_files_; | 501 return have_inspector_files_; |
502 } | 502 } |
503 | 503 |
504 void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) { | 504 void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) { |
505 SQLitePersistentCookieStore::ClearLocalState(profile_path.Append( | |
506 chrome::kCookieFilename)); | |
507 DOMStorageContext::ClearLocalState(profile_path, chrome::kExtensionScheme); | 505 DOMStorageContext::ClearLocalState(profile_path, chrome::kExtensionScheme); |
508 webkit_database::DatabaseTracker::ClearLocalState(profile_path); | 506 webkit_database::DatabaseTracker::ClearLocalState(profile_path); |
509 ChromeAppCacheService::ClearLocalState(profile_path); | 507 ChromeAppCacheService::ClearLocalState(profile_path); |
510 } | 508 } |
511 | 509 |
512 bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) { | 510 bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) { |
513 FilePath user_data_dir; | 511 FilePath user_data_dir; |
514 Profile* profile; | 512 Profile* profile; |
515 | 513 |
516 // Check for the existence of a profile manager. When quitting early, | 514 // Check for the existence of a profile manager. When quitting early, |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
818 } | 816 } |
819 | 817 |
820 void BrowserProcessImpl::OnAutoupdateTimer() { | 818 void BrowserProcessImpl::OnAutoupdateTimer() { |
821 if (CanAutorestartForUpdate()) { | 819 if (CanAutorestartForUpdate()) { |
822 DLOG(WARNING) << "Detected update. Restarting browser."; | 820 DLOG(WARNING) << "Detected update. Restarting browser."; |
823 RestartPersistentInstance(); | 821 RestartPersistentInstance(); |
824 } | 822 } |
825 } | 823 } |
826 | 824 |
827 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 825 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |