| 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 DCHECK(tab_strip_model_->empty()); | 450 if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers()) |
| 451 DCHECK(tab_strip_model_->empty()); |
| 452 |
| 451 tab_strip_model_->RemoveObserver(this); | 453 tab_strip_model_->RemoveObserver(this); |
| 452 | 454 |
| 453 // Destroy the BrowserCommandController before removing the browser, so that | 455 // Destroy the BrowserCommandController before removing the browser, so that |
| 454 // it doesn't act on any notifications that are sent as a result of removing | 456 // it doesn't act on any notifications that are sent as a result of removing |
| 455 // the browser. | 457 // the browser. |
| 456 command_controller_.reset(); | 458 command_controller_.reset(); |
| 457 BrowserList::RemoveBrowser(this); | 459 BrowserList::RemoveBrowser(this); |
| 458 | 460 |
| 459 SessionService* session_service = | 461 SessionService* session_service = |
| 460 SessionServiceFactory::GetForProfile(profile_); | 462 SessionServiceFactory::GetForProfile(profile_); |
| (...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2352 if (contents && !allow_js_access) { | 2354 if (contents && !allow_js_access) { |
| 2353 contents->web_contents()->GetController().LoadURL( | 2355 contents->web_contents()->GetController().LoadURL( |
| 2354 target_url, | 2356 target_url, |
| 2355 content::Referrer(), | 2357 content::Referrer(), |
| 2356 content::PAGE_TRANSITION_LINK, | 2358 content::PAGE_TRANSITION_LINK, |
| 2357 std::string()); // No extra headers. | 2359 std::string()); // No extra headers. |
| 2358 } | 2360 } |
| 2359 | 2361 |
| 2360 return contents != NULL; | 2362 return contents != NULL; |
| 2361 } | 2363 } |
| OLD | NEW |