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

Unified Diff: ios/web/navigation/crw_session_controller.mm

Issue 2705293014: Created web::UserAgentType. (Closed)
Patch Set: rebase + compile fix Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/navigation/crw_navigation_item_storage_unittest.mm ('k') | ios/web/navigation/crw_session_entry.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/navigation/crw_session_controller.mm
diff --git a/ios/web/navigation/crw_session_controller.mm b/ios/web/navigation/crw_session_controller.mm
index ca244ef94b99814bda5c65a1ae3e7f8c14b5d1e7..fca9891d71788412f168806b0faf4537e7bf1e60 100644
--- a/ios/web/navigation/crw_session_controller.mm
+++ b/ios/web/navigation/crw_session_controller.mm
@@ -27,6 +27,7 @@
#include "ios/web/public/browser_url_rewriter.h"
#include "ios/web/public/referrer.h"
#include "ios/web/public/ssl_status.h"
+#import "ios/web/public/web_client.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -473,8 +474,7 @@ - (void)pushNewItemWithURL:(const GURL&)URL
initiationType:web::NavigationInitiationType::USER_INITIATED]);
web::NavigationItemImpl* pushedItem = [pushedEntry navigationItemImpl];
- pushedItem->SetIsOverridingUserAgent(
- lastCommittedItem->IsOverridingUserAgent());
+ pushedItem->SetUserAgentType(lastCommittedItem->GetUserAgentType());
pushedItem->SetSerializedStateObject(stateObject);
pushedItem->SetIsCreatedFromPushState(true);
pushedItem->GetSSL() = lastCommittedItem->GetSSL();
@@ -678,6 +678,8 @@ - (CRWSessionEntry*)sessionEntryWithURL:(const GURL&)url
item->SetReferrer(referrer);
item->SetTransitionType(transition);
item->SetNavigationInitiationType(initiationType);
+ if (web::GetWebClient()->IsAppSpecificURL(loaded_url))
+ item->SetUserAgentType(web::UserAgentType::NONE);
return [[CRWSessionEntry alloc] initWithNavigationItem:std::move(item)];
}
« no previous file with comments | « ios/web/navigation/crw_navigation_item_storage_unittest.mm ('k') | ios/web/navigation/crw_session_entry.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698