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

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

Issue 2561983002: NavigationController: Reload methods migration (Closed)
Patch Set: merge master Created 4 years 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
OLDNEW
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_navigator.h" 5 #include "chrome/browser/ui/browser_navigator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 // Now that the |params->target_contents| is safely owned by the target 588 // Now that the |params->target_contents| is safely owned by the target
589 // Browser's TabStripModel, we can release ownership. 589 // Browser's TabStripModel, we can release ownership.
590 target_contents_owner.ReleaseOwnership(); 590 target_contents_owner.ReleaseOwnership();
591 } 591 }
592 592
593 if (singleton_index >= 0) { 593 if (singleton_index >= 0) {
594 WebContents* target = 594 WebContents* target =
595 params->browser->tab_strip_model()->GetWebContentsAt(singleton_index); 595 params->browser->tab_strip_model()->GetWebContentsAt(singleton_index);
596 596
597 if (target->IsCrashed()) { 597 if (target->IsCrashed()) {
598 target->GetController().Reload(true); 598 target->GetController().Reload(content::ReloadType::NORMAL, true);
599 } else if (params->path_behavior == NavigateParams::IGNORE_AND_NAVIGATE && 599 } else if (params->path_behavior == NavigateParams::IGNORE_AND_NAVIGATE &&
600 target->GetURL() != params->url) { 600 target->GetURL() != params->url) {
601 LoadURLInContents(target, params->url, params); 601 LoadURLInContents(target, params->url, params);
602 } 602 }
603 603
604 // If the singleton tab isn't already selected, select it. 604 // If the singleton tab isn't already selected, select it.
605 if (params->source_contents != params->target_contents) { 605 if (params->source_contents != params->target_contents) {
606 params->browser->tab_strip_model()->ActivateTabAt(singleton_index, 606 params->browser->tab_strip_model()->ActivateTabAt(singleton_index,
607 user_initiated); 607 user_initiated);
608 } 608 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 bool reverse_on_redirect = false; 667 bool reverse_on_redirect = false;
668 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( 668 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary(
669 &rewritten_url, browser_context, &reverse_on_redirect); 669 &rewritten_url, browser_context, &reverse_on_redirect);
670 670
671 // Some URLs are mapped to uber subpages. Do not allow them in incognito. 671 // Some URLs are mapped to uber subpages. Do not allow them in incognito.
672 return !(rewritten_url.scheme_piece() == content::kChromeUIScheme && 672 return !(rewritten_url.scheme_piece() == content::kChromeUIScheme &&
673 rewritten_url.host_piece() == chrome::kChromeUIUberHost); 673 rewritten_url.host_piece() == chrome::kChromeUIUberHost);
674 } 674 }
675 675
676 } // namespace chrome 676 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.cc ('k') | chrome/browser/ui/cocoa/applescript/tab_applescript.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698