OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // OS_WIN | 10 #endif // OS_WIN |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 | 509 |
510 profile_pref_registrar_.RemoveAll(); | 510 profile_pref_registrar_.RemoveAll(); |
511 local_pref_registrar_.RemoveAll(); | 511 local_pref_registrar_.RemoveAll(); |
512 | 512 |
513 encoding_auto_detect_.Destroy(); | 513 encoding_auto_detect_.Destroy(); |
514 | 514 |
515 if (profile_->IsOffTheRecord() && | 515 if (profile_->IsOffTheRecord() && |
516 !BrowserList::IsOffTheRecordSessionActiveForProfile(profile_)) { | 516 !BrowserList::IsOffTheRecordSessionActiveForProfile(profile_)) { |
517 // An incognito profile is no longer needed, this indirectly frees | 517 // An incognito profile is no longer needed, this indirectly frees |
518 // its cache and cookies once it gets destroyed at the appropriate time. | 518 // its cache and cookies once it gets destroyed at the appropriate time. |
519 ProfileDestroyer::DestroyOffTheRecordProfile(profile_); | 519 ProfileDestroyer::DestroyProfileWhenAppropriate(profile_); |
520 } | 520 } |
521 | 521 |
522 // There may be pending file dialogs, we need to tell them that we've gone | 522 // There may be pending file dialogs, we need to tell them that we've gone |
523 // away so they don't try and call back to us. | 523 // away so they don't try and call back to us. |
524 if (select_file_dialog_.get()) | 524 if (select_file_dialog_.get()) |
525 select_file_dialog_->ListenerDestroyed(); | 525 select_file_dialog_->ListenerDestroyed(); |
526 | 526 |
527 TabRestoreServiceDestroyed(tab_restore_service_); | 527 TabRestoreServiceDestroyed(tab_restore_service_); |
528 } | 528 } |
529 | 529 |
(...skipping 4929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5459 if (contents && !allow_js_access) { | 5459 if (contents && !allow_js_access) { |
5460 contents->web_contents()->GetController().LoadURL( | 5460 contents->web_contents()->GetController().LoadURL( |
5461 target_url, | 5461 target_url, |
5462 content::Referrer(), | 5462 content::Referrer(), |
5463 content::PAGE_TRANSITION_LINK, | 5463 content::PAGE_TRANSITION_LINK, |
5464 std::string()); // No extra headers. | 5464 std::string()); // No extra headers. |
5465 } | 5465 } |
5466 | 5466 |
5467 return contents != NULL; | 5467 return contents != NULL; |
5468 } | 5468 } |
OLD | NEW |