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

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

Issue 7622005: Ensure that incognito profiles are correctly destroyed when all incognito windows belonging to a ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 tab_restore_service->BrowserClosed(tab_restore_service_delegate()); 381 tab_restore_service->BrowserClosed(tab_restore_service_delegate());
382 382
383 profile_pref_registrar_.RemoveAll(); 383 profile_pref_registrar_.RemoveAll();
384 local_pref_registrar_.RemoveAll(); 384 local_pref_registrar_.RemoveAll();
385 385
386 encoding_auto_detect_.Destroy(); 386 encoding_auto_detect_.Destroy();
387 use_vertical_tabs_.Destroy(); 387 use_vertical_tabs_.Destroy();
388 use_compact_navigation_bar_.Destroy(); 388 use_compact_navigation_bar_.Destroy();
389 389
390 if (profile_->IsOffTheRecord() && 390 if (profile_->IsOffTheRecord() &&
391 !BrowserList::IsOffTheRecordSessionActive()) { 391 !BrowserList::IsOffTheRecordSessionActiveForProfile(profile_)) {
392 // An incognito profile is no longer needed, this indirectly 392 // An incognito profile is no longer needed, this indirectly
393 // frees its cache and cookies. 393 // frees its cache and cookies.
394 profile_->GetOriginalProfile()->DestroyOffTheRecordProfile(); 394 profile_->GetOriginalProfile()->DestroyOffTheRecordProfile();
395 } 395 }
396 396
397 // There may be pending file dialogs, we need to tell them that we've gone 397 // There may be pending file dialogs, we need to tell them that we've gone
398 // away so they don't try and call back to us. 398 // away so they don't try and call back to us.
399 if (select_file_dialog_.get()) 399 if (select_file_dialog_.get())
400 select_file_dialog_->ListenerDestroyed(); 400 select_file_dialog_->ListenerDestroyed();
401 401
(...skipping 4434 matching lines...) Expand 10 before | Expand all | Expand 10 after
4836 } 4836 }
4837 4837
4838 void Browser::ShowSyncSetup() { 4838 void Browser::ShowSyncSetup() {
4839 ProfileSyncService* service = 4839 ProfileSyncService* service =
4840 profile()->GetOriginalProfile()->GetProfileSyncService(); 4840 profile()->GetOriginalProfile()->GetProfileSyncService();
4841 if (service->HasSyncSetupCompleted()) 4841 if (service->HasSyncSetupCompleted())
4842 ShowOptionsTab(chrome::kSyncSetupSubPage); 4842 ShowOptionsTab(chrome::kSyncSetupSubPage);
4843 else 4843 else
4844 service->ShowLoginDialog(); 4844 service->ShowLoginDialog();
4845 } 4845 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager_resource_providers.cc ('k') | chrome/browser/ui/browser_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698