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

Side by Side Diff: ios/web/navigation/navigation_item_impl.mm

Issue 2706173003: change navigation initiation type default value to RENDERER_INITIATED (Closed)
Patch Set: Add NONE to NavigationInitiationType 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/web/navigation/navigation_item_impl.h" 5 #import "ios/web/navigation/navigation_item_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 NavigationItemImpl::NavigationItemImpl() 40 NavigationItemImpl::NavigationItemImpl()
41 : unique_id_(GetUniqueIDInConstructor()), 41 : unique_id_(GetUniqueIDInConstructor()),
42 transition_type_(ui::PAGE_TRANSITION_LINK), 42 transition_type_(ui::PAGE_TRANSITION_LINK),
43 is_overriding_user_agent_(false), 43 is_overriding_user_agent_(false),
44 is_created_from_push_state_(false), 44 is_created_from_push_state_(false),
45 has_state_been_replaced_(false), 45 has_state_been_replaced_(false),
46 is_created_from_hash_change_(false), 46 is_created_from_hash_change_(false),
47 should_skip_repost_form_confirmation_(false), 47 should_skip_repost_form_confirmation_(false),
48 navigation_initiation_type_( 48 navigation_initiation_type_(web::NavigationInitiationType::NONE),
49 web::NavigationInitiationType::USER_INITIATED),
50 is_unsafe_(false), 49 is_unsafe_(false),
51 facade_delegate_(nullptr) {} 50 facade_delegate_(nullptr) {}
52 51
53 NavigationItemImpl::~NavigationItemImpl() { 52 NavigationItemImpl::~NavigationItemImpl() {
54 } 53 }
55 54
56 NavigationItemImpl::NavigationItemImpl(const NavigationItemImpl& item) 55 NavigationItemImpl::NavigationItemImpl(const NavigationItemImpl& item)
57 : unique_id_(item.unique_id_), 56 : unique_id_(item.unique_id_),
58 original_request_url_(item.original_request_url_), 57 original_request_url_(item.original_request_url_),
59 url_(item.url_), 58 url_(item.url_),
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 [http_request_headers_ removeObjectForKey:key]; 298 [http_request_headers_ removeObjectForKey:key];
300 if (![http_request_headers_ count]) 299 if (![http_request_headers_ count])
301 http_request_headers_.reset(); 300 http_request_headers_.reset();
302 } 301 }
303 302
304 void NavigationItemImpl::ResetHttpRequestHeaders() { 303 void NavigationItemImpl::ResetHttpRequestHeaders() {
305 http_request_headers_.reset(); 304 http_request_headers_.reset();
306 } 305 }
307 306
308 void NavigationItemImpl::ResetForCommit() { 307 void NavigationItemImpl::ResetForCommit() {
309 // Any state that only matters when a navigation item is pending should be 308 // Navigation initiation type is only valid for pending navigations, thus
310 // cleared here. 309 // always reset to NONE after the item is committed.
311 SetNavigationInitiationType(web::NavigationInitiationType::USER_INITIATED); 310 SetNavigationInitiationType(web::NavigationInitiationType::NONE);
312 } 311 }
313 312
314 } // namespace web 313 } // namespace web
OLDNEW
« no previous file with comments | « no previous file | ios/web/navigation/navigation_manager_impl.h » ('j') | ios/web/navigation/navigation_manager_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698