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

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

Issue 297483007: Revert 270890 "Unload all apps / extensions immediately when del..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2006/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
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 // Notify PDM that this is a first run. 438 // Notify PDM that this is a first run.
439 ImportAutofillDataWin( 439 ImportAutofillDataWin(
440 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); 440 autofill::PersonalDataManagerFactory::GetForProfile(profile_));
441 #endif // defined(OS_WIN) 441 #endif // defined(OS_WIN)
442 } 442 }
443 443
444 fullscreen_controller_.reset(new FullscreenController(this)); 444 fullscreen_controller_.reset(new FullscreenController(this));
445 } 445 }
446 446
447 Browser::~Browser() { 447 Browser::~Browser() {
448 // Stop observing notifications before continuing with destruction. Profile
449 // destruction will unload extensions and reentrant calls to Browser:: should
450 // be avoided while it is being torn down.
451 registrar_.RemoveAll();
452
453 // The tab strip should not have any tabs at this point. 448 // The tab strip should not have any tabs at this point.
454 DCHECK(tab_strip_model_->empty()); 449 DCHECK(tab_strip_model_->empty());
455 tab_strip_model_->RemoveObserver(this); 450 tab_strip_model_->RemoveObserver(this);
456 451
457 // Destroy the BrowserCommandController before removing the browser, so that 452 // Destroy the BrowserCommandController before removing the browser, so that
458 // it doesn't act on any notifications that are sent as a result of removing 453 // it doesn't act on any notifications that are sent as a result of removing
459 // the browser. 454 // the browser.
460 command_controller_.reset(); 455 command_controller_.reset();
461 BrowserList::RemoveBrowser(this); 456 BrowserList::RemoveBrowser(this);
462 457
(...skipping 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after
2419 if (contents && !allow_js_access) { 2414 if (contents && !allow_js_access) {
2420 contents->web_contents()->GetController().LoadURL( 2415 contents->web_contents()->GetController().LoadURL(
2421 target_url, 2416 target_url,
2422 content::Referrer(), 2417 content::Referrer(),
2423 content::PAGE_TRANSITION_LINK, 2418 content::PAGE_TRANSITION_LINK,
2424 std::string()); // No extra headers. 2419 std::string()); // No extra headers.
2425 } 2420 }
2426 2421
2427 return contents != NULL; 2422 return contents != NULL;
2428 } 2423 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698