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

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: Fixed multithreading and added unit tests. 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) 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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 &BrowserProcessImpl::OnAutoupdateTimer); 551 &BrowserProcessImpl::OnAutoupdateTimer);
552 } 552 }
553 #endif 553 #endif
554 554
555 bool BrowserProcessImpl::have_inspector_files() const { 555 bool BrowserProcessImpl::have_inspector_files() const {
556 return have_inspector_files_; 556 return have_inspector_files_;
557 } 557 }
558 558
559 void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) { 559 void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) {
560 webkit_database::DatabaseTracker::ClearLocalState(profile_path); 560 webkit_database::DatabaseTracker::ClearLocalState(profile_path);
561 ChromeAppCacheService::ClearLocalState(profile_path);
562 } 561 }
563 562
564 bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) { 563 bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) {
565 FilePath user_data_dir; 564 FilePath user_data_dir;
566 Profile* profile; 565 Profile* profile;
567 566
568 // Check for the existence of a profile manager. When quitting early, 567 // Check for the existence of a profile manager. When quitting early,
569 // e.g. because another chrome instance is running, or when invoked with 568 // e.g. because another chrome instance is running, or when invoked with
570 // options such as --uninstall or --try-chrome-again=0, the profile manager 569 // options such as --uninstall or --try-chrome-again=0, the profile manager
571 // does not exist yet. 570 // does not exist yet.
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 } 902 }
904 903
905 void BrowserProcessImpl::OnAutoupdateTimer() { 904 void BrowserProcessImpl::OnAutoupdateTimer() {
906 if (CanAutorestartForUpdate()) { 905 if (CanAutorestartForUpdate()) {
907 DLOG(WARNING) << "Detected update. Restarting browser."; 906 DLOG(WARNING) << "Detected update. Restarting browser.";
908 RestartPersistentInstance(); 907 RestartPersistentInstance();
909 } 908 }
910 } 909 }
911 910
912 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 911 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698