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

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

Issue 266343002: Unload all apps / extensions when deleting a profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/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 // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 // Notify PDM that this is a first run. 440 // Notify PDM that this is a first run.
441 ImportAutofillDataWin( 441 ImportAutofillDataWin(
442 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); 442 autofill::PersonalDataManagerFactory::GetForProfile(profile_));
443 #endif // defined(OS_WIN) 443 #endif // defined(OS_WIN)
444 } 444 }
445 445
446 fullscreen_controller_.reset(new FullscreenController(this)); 446 fullscreen_controller_.reset(new FullscreenController(this));
447 } 447 }
448 448
449 Browser::~Browser() { 449 Browser::~Browser() {
450 registrar_.RemoveAll();
sky 2014/05/07 22:17:32 Why is this explicitly needed? Assuming it is neee
scheib 2014/05/08 15:17:52 Done.
451
450 // The tab strip should not have any tabs at this point. 452 // The tab strip should not have any tabs at this point.
451 DCHECK(tab_strip_model_->empty()); 453 DCHECK(tab_strip_model_->empty());
452 tab_strip_model_->RemoveObserver(this); 454 tab_strip_model_->RemoveObserver(this);
453 455
454 // Destroy the BrowserCommandController before removing the browser, so that 456 // Destroy the BrowserCommandController before removing the browser, so that
455 // it doesn't act on any notifications that are sent as a result of removing 457 // it doesn't act on any notifications that are sent as a result of removing
456 // the browser. 458 // the browser.
457 command_controller_.reset(); 459 command_controller_.reset();
458 BrowserList::RemoveBrowser(this); 460 BrowserList::RemoveBrowser(this);
459 461
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after
2417 if (contents && !allow_js_access) { 2419 if (contents && !allow_js_access) {
2418 contents->web_contents()->GetController().LoadURL( 2420 contents->web_contents()->GetController().LoadURL(
2419 target_url, 2421 target_url,
2420 content::Referrer(), 2422 content::Referrer(),
2421 content::PAGE_TRANSITION_LINK, 2423 content::PAGE_TRANSITION_LINK,
2422 std::string()); // No extra headers. 2424 std::string()); // No extra headers.
2423 } 2425 }
2424 2426
2425 return contents != NULL; 2427 return contents != NULL;
2426 } 2428 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698