Chromium Code Reviews| 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 475 #endif | 475 #endif |
| 476 | 476 |
| 477 profile_pref_registrar_.RemoveAll(); | 477 profile_pref_registrar_.RemoveAll(); |
| 478 | 478 |
| 479 encoding_auto_detect_.Destroy(); | 479 encoding_auto_detect_.Destroy(); |
| 480 | 480 |
| 481 // Destroy BrowserExtensionWindowController before the incognito profile | 481 // Destroy BrowserExtensionWindowController before the incognito profile |
| 482 // is destroyed to make sure the chrome.windows.onRemoved event is sent. | 482 // is destroyed to make sure the chrome.windows.onRemoved event is sent. |
| 483 extension_window_controller_.reset(); | 483 extension_window_controller_.reset(); |
| 484 | 484 |
| 485 // Destroy BrowserInstantController before the incongnito profile is destroyed | |
| 486 // because the InstantController destructor depends on this profile. | |
| 487 instant_controller_.reset(); | |
|
Peter Kasting
2013/06/21 02:33:30
Check with erg/rlp on whether there's a better way
kmadhusu
2013/06/21 02:49:39
rlp@: Is there any better way to indicate this dep
rpetterson
2013/06/21 06:19:06
Are BrowserInstantControllers per profile or per b
kmadhusu
2013/06/21 15:45:45
BrowserInstantController is instantiated per brows
| |
| 488 | |
| 485 if (profile_->IsOffTheRecord() && | 489 if (profile_->IsOffTheRecord() && |
| 486 !BrowserList::IsOffTheRecordSessionActiveForProfile(profile_)) { | 490 !BrowserList::IsOffTheRecordSessionActiveForProfile(profile_)) { |
| 487 // An incognito profile is no longer needed, this indirectly frees | 491 // An incognito profile is no longer needed, this indirectly frees |
| 488 // its cache and cookies once it gets destroyed at the appropriate time. | 492 // its cache and cookies once it gets destroyed at the appropriate time. |
| 489 ProfileDestroyer::DestroyProfileWhenAppropriate(profile_); | 493 ProfileDestroyer::DestroyProfileWhenAppropriate(profile_); |
| 490 } | 494 } |
| 491 | 495 |
| 492 // There may be pending file dialogs, we need to tell them that we've gone | 496 // There may be pending file dialogs, we need to tell them that we've gone |
| 493 // away so they don't try and call back to us. | 497 // away so they don't try and call back to us. |
| 494 if (select_file_dialog_.get()) | 498 if (select_file_dialog_.get()) |
| (...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2211 if (contents && !allow_js_access) { | 2215 if (contents && !allow_js_access) { |
| 2212 contents->web_contents()->GetController().LoadURL( | 2216 contents->web_contents()->GetController().LoadURL( |
| 2213 target_url, | 2217 target_url, |
| 2214 content::Referrer(), | 2218 content::Referrer(), |
| 2215 content::PAGE_TRANSITION_LINK, | 2219 content::PAGE_TRANSITION_LINK, |
| 2216 std::string()); // No extra headers. | 2220 std::string()); // No extra headers. |
| 2217 } | 2221 } |
| 2218 | 2222 |
| 2219 return contents != NULL; | 2223 return contents != NULL; |
| 2220 } | 2224 } |
| OLD | NEW |