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

Side by Side Diff: content/child/web_url_request_util.cc

Issue 1391583002: Introduce "navigate" mode in Requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 #include "content/child/web_url_request_util.h" 5 #include "content/child/web_url_request_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "net/base/load_flags.h" 9 #include "net/base/load_flags.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 274 }
275 request_body->set_identifier(request.httpBody().identifier()); 275 request_body->set_identifier(request.httpBody().identifier());
276 return request_body; 276 return request_body;
277 } 277 }
278 278
279 #define STATIC_ASSERT_MATCHING_ENUMS(content_name, blink_name) \ 279 #define STATIC_ASSERT_MATCHING_ENUMS(content_name, blink_name) \
280 static_assert( \ 280 static_assert( \
281 static_cast<int>(content_name) == static_cast<int>(blink_name), \ 281 static_cast<int>(content_name) == static_cast<int>(blink_name), \
282 "mismatching enums: " #content_name) 282 "mismatching enums: " #content_name)
283 283
284 STATIC_ASSERT_MATCHING_ENUMS(FETCH_REQUEST_MODE_NAVIGATE,
285 WebURLRequest::FetchRequestModeNavigate);
284 STATIC_ASSERT_MATCHING_ENUMS(FETCH_REQUEST_MODE_SAME_ORIGIN, 286 STATIC_ASSERT_MATCHING_ENUMS(FETCH_REQUEST_MODE_SAME_ORIGIN,
285 WebURLRequest::FetchRequestModeSameOrigin); 287 WebURLRequest::FetchRequestModeSameOrigin);
286 STATIC_ASSERT_MATCHING_ENUMS(FETCH_REQUEST_MODE_NO_CORS, 288 STATIC_ASSERT_MATCHING_ENUMS(FETCH_REQUEST_MODE_NO_CORS,
287 WebURLRequest::FetchRequestModeNoCORS); 289 WebURLRequest::FetchRequestModeNoCORS);
288 STATIC_ASSERT_MATCHING_ENUMS(FETCH_REQUEST_MODE_CORS, 290 STATIC_ASSERT_MATCHING_ENUMS(FETCH_REQUEST_MODE_CORS,
289 WebURLRequest::FetchRequestModeCORS); 291 WebURLRequest::FetchRequestModeCORS);
290 STATIC_ASSERT_MATCHING_ENUMS( 292 STATIC_ASSERT_MATCHING_ENUMS(
291 FETCH_REQUEST_MODE_CORS_WITH_FORCED_PREFLIGHT, 293 FETCH_REQUEST_MODE_CORS_WITH_FORCED_PREFLIGHT,
292 WebURLRequest::FetchRequestModeCORSWithForcedPreflight); 294 WebURLRequest::FetchRequestModeCORSWithForcedPreflight);
293 295
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 bool stale_copy_in_cache, 434 bool stale_copy_in_cache,
433 int reason, 435 int reason,
434 bool was_ignored_by_handler) { 436 bool was_ignored_by_handler) {
435 blink::WebURLError error = 437 blink::WebURLError error =
436 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason); 438 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason);
437 error.wasIgnoredByHandler = was_ignored_by_handler; 439 error.wasIgnoredByHandler = was_ignored_by_handler;
438 return error; 440 return error;
439 } 441 }
440 442
441 } // namespace content 443 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698