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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 10824020: Move PROFILE_DESTROYED notification to ProfileDestroyer and observe it in ExtensionProcessManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 454
455 FilePath ProfileImpl::last_selected_directory() { 455 FilePath ProfileImpl::last_selected_directory() {
456 return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); 456 return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory);
457 } 457 }
458 458
459 void ProfileImpl::set_last_selected_directory(const FilePath& path) { 459 void ProfileImpl::set_last_selected_directory(const FilePath& path) {
460 GetPrefs()->SetFilePath(prefs::kSelectFileLastDirectory, path); 460 GetPrefs()->SetFilePath(prefs::kSelectFileLastDirectory, path);
461 } 461 }
462 462
463 ProfileImpl::~ProfileImpl() { 463 ProfileImpl::~ProfileImpl() {
464 content::NotificationService::current()->Notify(
465 chrome::NOTIFICATION_PROFILE_DESTROYED,
466 content::Source<Profile>(this),
467 content::NotificationService::NoDetails());
468 bool prefs_loaded = prefs_->GetInitializationStatus() != 464 bool prefs_loaded = prefs_->GetInitializationStatus() !=
469 PrefService::INITIALIZATION_STATUS_WAITING; 465 PrefService::INITIALIZATION_STATUS_WAITING;
470 466
471 #if defined(ENABLE_SESSION_SERVICE) 467 #if defined(ENABLE_SESSION_SERVICE)
472 StopCreateSessionServiceTimer(); 468 StopCreateSessionServiceTimer();
473 #endif 469 #endif
474 470
475 // Remove pref observers 471 // Remove pref observers
476 pref_change_registrar_.RemoveAll(); 472 pref_change_registrar_.RemoveAll();
477 473
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 if (!path.empty()) 1070 if (!path.empty())
1075 *cache_path = path; 1071 *cache_path = path;
1076 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : 1072 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) :
1077 prefs_->GetInteger(prefs::kDiskCacheSize); 1073 prefs_->GetInteger(prefs::kDiskCacheSize);
1078 } 1074 }
1079 1075
1080 base::Callback<ChromeURLDataManagerBackend*(void)> 1076 base::Callback<ChromeURLDataManagerBackend*(void)>
1081 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { 1077 ProfileImpl::GetChromeURLDataManagerBackendGetter() const {
1082 return io_data_.GetChromeURLDataManagerBackendGetter(); 1078 return io_data_.GetChromeURLDataManagerBackendGetter();
1083 } 1079 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698