OLD | NEW |
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 Loading... |
440 ImportAutofillDataWin( | 440 ImportAutofillDataWin( |
441 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); | 441 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); |
442 #endif // defined(OS_WIN) | 442 #endif // defined(OS_WIN) |
443 } | 443 } |
444 | 444 |
445 fullscreen_controller_.reset(new FullscreenController(this)); | 445 fullscreen_controller_.reset(new FullscreenController(this)); |
446 } | 446 } |
447 | 447 |
448 Browser::~Browser() { | 448 Browser::~Browser() { |
449 // The tab strip should not have any tabs at this point. | 449 // The tab strip should not have any tabs at this point. |
450 if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers()) | 450 DCHECK(tab_strip_model_->empty()); |
451 DCHECK(tab_strip_model_->empty()); | |
452 | |
453 tab_strip_model_->RemoveObserver(this); | 451 tab_strip_model_->RemoveObserver(this); |
454 | 452 |
455 // Destroy the BrowserCommandController before removing the browser, so that | 453 // Destroy the BrowserCommandController before removing the browser, so that |
456 // it doesn't act on any notifications that are sent as a result of removing | 454 // it doesn't act on any notifications that are sent as a result of removing |
457 // the browser. | 455 // the browser. |
458 command_controller_.reset(); | 456 command_controller_.reset(); |
459 BrowserList::RemoveBrowser(this); | 457 BrowserList::RemoveBrowser(this); |
460 | 458 |
461 SessionService* session_service = | 459 SessionService* session_service = |
462 SessionServiceFactory::GetForProfile(profile_); | 460 SessionServiceFactory::GetForProfile(profile_); |
(...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2354 if (contents && !allow_js_access) { | 2352 if (contents && !allow_js_access) { |
2355 contents->web_contents()->GetController().LoadURL( | 2353 contents->web_contents()->GetController().LoadURL( |
2356 target_url, | 2354 target_url, |
2357 content::Referrer(), | 2355 content::Referrer(), |
2358 content::PAGE_TRANSITION_LINK, | 2356 content::PAGE_TRANSITION_LINK, |
2359 std::string()); // No extra headers. | 2357 std::string()); // No extra headers. |
2360 } | 2358 } |
2361 | 2359 |
2362 return contents != NULL; | 2360 return contents != NULL; |
2363 } | 2361 } |
OLD | NEW |