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

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

Issue 6077005: Refactored app cache clear on exit code to happen in the object owning the files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more unittest change. Created 9 years, 11 months 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/file_util.h" 12 #include "base/file_util.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/task.h" 14 #include "base/task.h"
15 #include "base/threading/thread.h" 15 #include "base/threading/thread.h"
16 #include "base/threading/thread_restrictions.h" 16 #include "base/threading/thread_restrictions.h"
17 #include "base/synchronization/waitable_event.h" 17 #include "base/synchronization/waitable_event.h"
18 #include "chrome/browser/appcache/chrome_appcache_service.h"
19 #include "chrome/browser/automation/automation_provider_list.h" 18 #include "chrome/browser/automation/automation_provider_list.h"
20 #include "chrome/browser/browser_child_process_host.h" 19 #include "chrome/browser/browser_child_process_host.h"
21 #include "chrome/browser/browser_list.h" 20 #include "chrome/browser/browser_list.h"
22 #include "chrome/browser/browser_main.h" 21 #include "chrome/browser/browser_main.h"
23 #include "chrome/browser/browser_process_sub_thread.h" 22 #include "chrome/browser/browser_process_sub_thread.h"
24 #include "chrome/browser/browser_thread.h" 23 #include "chrome/browser/browser_thread.h"
25 #include "chrome/browser/browser_trial.h" 24 #include "chrome/browser/browser_trial.h"
26 #include "chrome/browser/debugger/debugger_wrapper.h" 25 #include "chrome/browser/debugger/debugger_wrapper.h"
27 #include "chrome/browser/debugger/devtools_manager.h" 26 #include "chrome/browser/debugger/devtools_manager.h"
28 #include "chrome/browser/download/download_file_manager.h" 27 #include "chrome/browser/download/download_file_manager.h"
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 &BrowserProcessImpl::OnAutoupdateTimer); 568 &BrowserProcessImpl::OnAutoupdateTimer);
570 } 569 }
571 #endif 570 #endif
572 571
573 bool BrowserProcessImpl::have_inspector_files() const { 572 bool BrowserProcessImpl::have_inspector_files() const {
574 return have_inspector_files_; 573 return have_inspector_files_;
575 } 574 }
576 575
577 void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) { 576 void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) {
578 webkit_database::DatabaseTracker::ClearLocalState(profile_path); 577 webkit_database::DatabaseTracker::ClearLocalState(profile_path);
579 ChromeAppCacheService::ClearLocalState(profile_path);
580 } 578 }
581 579
582 bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) { 580 bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) {
583 FilePath user_data_dir; 581 FilePath user_data_dir;
584 Profile* profile; 582 Profile* profile;
585 583
586 // Check for the existence of a profile manager. When quitting early, 584 // Check for the existence of a profile manager. When quitting early,
587 // e.g. because another chrome instance is running, or when invoked with 585 // e.g. because another chrome instance is running, or when invoked with
588 // options such as --uninstall or --try-chrome-again=0, the profile manager 586 // options such as --uninstall or --try-chrome-again=0, the profile manager
589 // does not exist yet. 587 // does not exist yet.
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 } 920 }
923 921
924 void BrowserProcessImpl::OnAutoupdateTimer() { 922 void BrowserProcessImpl::OnAutoupdateTimer() {
925 if (CanAutorestartForUpdate()) { 923 if (CanAutorestartForUpdate()) {
926 DLOG(WARNING) << "Detected update. Restarting browser."; 924 DLOG(WARNING) << "Detected update. Restarting browser.";
927 RestartPersistentInstance(); 925 RestartPersistentInstance();
928 } 926 }
929 } 927 }
930 928
931 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 929 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/appcache/chrome_appcache_service_unittest.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698