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

Side by Side Diff: ios/chrome/browser/tabs/tab.mm

Issue 2788443002: Updated redirect chain related TODO. (Closed)
Patch Set: Created 3 years, 8 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #import "ios/chrome/browser/tabs/tab.h" 5 #import "ios/chrome/browser/tabs/tab.h"
6 6
7 #import <CoreLocation/CoreLocation.h> 7 #import <CoreLocation/CoreLocation.h>
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 if (item->GetURL() != originalURL) { 1011 if (item->GetURL() != originalURL) {
1012 // Simulate a valid redirect chain in case of URL that have been modified 1012 // Simulate a valid redirect chain in case of URL that have been modified
1013 // in |CRWWebController finishHistoryNavigationFromEntry:|. 1013 // in |CRWWebController finishHistoryNavigationFromEntry:|.
1014 const std::string& urlSpec = item->GetURL().spec(); 1014 const std::string& urlSpec = item->GetURL().spec();
1015 size_t urlSpecLength = urlSpec.size(); 1015 size_t urlSpecLength = urlSpec.size();
1016 if (item->GetTransitionType() & ui::PAGE_TRANSITION_CLIENT_REDIRECT || 1016 if (item->GetTransitionType() & ui::PAGE_TRANSITION_CLIENT_REDIRECT ||
1017 (urlSpecLength && (urlSpec.at(urlSpecLength - 1) == '#') && 1017 (urlSpecLength && (urlSpec.at(urlSpecLength - 1) == '#') &&
1018 !urlSpec.compare(0, urlSpecLength - 1, originalURL.spec()))) { 1018 !urlSpec.compare(0, urlSpecLength - 1, originalURL.spec()))) {
1019 redirects.push_back(referrer.url); 1019 redirects.push_back(referrer.url);
1020 } 1020 }
1021 // TODO(crbug.com/661670): the redirect chain is not constructed the same 1021 // TODO(crbug.com/703872): the redirect chain is not constructed the same
1022 // way as upstream so this part needs to be revised. 1022 // way as upstream so this part needs to be revised.
1023 redirects.push_back(originalURL); 1023 redirects.push_back(originalURL);
1024 redirects.push_back(url); 1024 redirects.push_back(url);
1025 } 1025 }
1026 1026
1027 DCHECK(item->GetTimestamp().ToInternalValue() > 0); 1027 DCHECK(item->GetTimestamp().ToInternalValue() > 0);
1028 if ([self isPrerenderTab]) { 1028 if ([self isPrerenderTab]) {
1029 // Clicks on content suggestions on the NTP should not contribute to the 1029 // Clicks on content suggestions on the NTP should not contribute to the
1030 // Most Visited tiles in the NTP. 1030 // Most Visited tiles in the NTP.
1031 const bool consider_for_ntp_most_visited = 1031 const bool consider_for_ntp_most_visited =
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
2087 2087
2088 - (TabModel*)parentTabModel { 2088 - (TabModel*)parentTabModel {
2089 return parentTabModel_; 2089 return parentTabModel_;
2090 } 2090 }
2091 2091
2092 - (FormInputAccessoryViewController*)inputAccessoryViewController { 2092 - (FormInputAccessoryViewController*)inputAccessoryViewController {
2093 return inputAccessoryViewController_.get(); 2093 return inputAccessoryViewController_.get();
2094 } 2094 }
2095 2095
2096 @end 2096 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698