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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2689653003: PlzNavigate: Enforce 'form-action' CSP on the browser-side. (Closed)
Patch Set: Add TODO. Created 3 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 6318 matching lines...) Expand 10 before | Expand all | Expand 10 after
6329 6329
6330 int load_flags = GetLoadFlagsForWebURLRequest(info.urlRequest); 6330 int load_flags = GetLoadFlagsForWebURLRequest(info.urlRequest);
6331 6331
6332 // Requests initiated via devtools can have caching disabled. 6332 // Requests initiated via devtools can have caching disabled.
6333 if (info.isCacheDisabled) { 6333 if (info.isCacheDisabled) {
6334 // Turn off all caching related flags and set LOAD_BYPASS_CACHE. 6334 // Turn off all caching related flags and set LOAD_BYPASS_CACHE.
6335 load_flags &= ~(net::LOAD_VALIDATE_CACHE | net::LOAD_SKIP_CACHE_VALIDATION | 6335 load_flags &= ~(net::LOAD_VALIDATE_CACHE | net::LOAD_SKIP_CACHE_VALIDATION |
6336 net::LOAD_ONLY_FROM_CACHE | net::LOAD_DISABLE_CACHE); 6336 net::LOAD_ONLY_FROM_CACHE | net::LOAD_DISABLE_CACHE);
6337 load_flags |= net::LOAD_BYPASS_CACHE; 6337 load_flags |= net::LOAD_BYPASS_CACHE;
6338 } 6338 }
6339
6340 bool is_form_submission =
6341 info.navigationType == blink::WebNavigationTypeFormSubmitted ||
6342 info.navigationType == blink::WebNavigationTypeFormResubmitted;
6343
6339 BeginNavigationParams begin_navigation_params( 6344 BeginNavigationParams begin_navigation_params(
6340 GetWebURLRequestHeaders(info.urlRequest), load_flags, 6345 GetWebURLRequestHeaders(info.urlRequest), load_flags,
6341 info.urlRequest.hasUserGesture(), 6346 info.urlRequest.hasUserGesture(),
6342 info.urlRequest.getServiceWorkerMode() != 6347 info.urlRequest.getServiceWorkerMode() !=
6343 blink::WebURLRequest::ServiceWorkerMode::All, 6348 blink::WebURLRequest::ServiceWorkerMode::All,
6344 GetRequestContextTypeForWebURLRequest(info.urlRequest), 6349 GetRequestContextTypeForWebURLRequest(info.urlRequest),
6345 GetMixedContentContextTypeForWebURLRequest(info.urlRequest), 6350 GetMixedContentContextTypeForWebURLRequest(info.urlRequest),
6346 initiator_origin); 6351 is_form_submission, initiator_origin);
6347 6352
6348 if (!info.form.isNull()) { 6353 if (!info.form.isNull()) {
6349 WebSearchableFormData web_searchable_form_data(info.form); 6354 WebSearchableFormData web_searchable_form_data(info.form);
6350 begin_navigation_params.searchable_form_url = 6355 begin_navigation_params.searchable_form_url =
6351 web_searchable_form_data.url(); 6356 web_searchable_form_data.url();
6352 begin_navigation_params.searchable_form_encoding = 6357 begin_navigation_params.searchable_form_encoding =
6353 web_searchable_form_data.encoding().utf8(); 6358 web_searchable_form_data.encoding().utf8();
6354 } 6359 }
6355 6360
6356 if (info.isClientRedirect) 6361 if (info.isClientRedirect)
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
6902 // event target. Potentially a Pepper plugin will receive the event. 6907 // event target. Potentially a Pepper plugin will receive the event.
6903 // In order to tell whether a plugin gets the last mouse event and which it 6908 // In order to tell whether a plugin gets the last mouse event and which it
6904 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6909 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6905 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6910 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6906 // |pepper_last_mouse_event_target_|. 6911 // |pepper_last_mouse_event_target_|.
6907 pepper_last_mouse_event_target_ = nullptr; 6912 pepper_last_mouse_event_target_ = nullptr;
6908 #endif 6913 #endif
6909 } 6914 }
6910 6915
6911 } // namespace content 6916 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698