| OLD | NEW |
| 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 "modules/fetch/FetchManager.h" | 5 #include "modules/fetch/FetchManager.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 "mode is \"no-cors\"."); | 375 "mode is \"no-cors\"."); |
| 376 return; | 376 return; |
| 377 } | 377 } |
| 378 } | 378 } |
| 379 } else if (!SecurityOrigin::Create(response.Url()) | 379 } else if (!SecurityOrigin::Create(response.Url()) |
| 380 ->IsSameSchemeHostPort(request_->Origin().Get())) { | 380 ->IsSameSchemeHostPort(request_->Origin().Get())) { |
| 381 // Recompute the tainting if the request was redirected to a different | 381 // Recompute the tainting if the request was redirected to a different |
| 382 // origin. | 382 // origin. |
| 383 switch (request_->Mode()) { | 383 switch (request_->Mode()) { |
| 384 case WebURLRequest::kFetchRequestModeSameOrigin: | 384 case WebURLRequest::kFetchRequestModeSameOrigin: |
| 385 ASSERT_NOT_REACHED(); | 385 NOTREACHED(); |
| 386 break; | 386 break; |
| 387 case WebURLRequest::kFetchRequestModeNoCORS: | 387 case WebURLRequest::kFetchRequestModeNoCORS: |
| 388 tainting = FetchRequestData::kOpaqueTainting; | 388 tainting = FetchRequestData::kOpaqueTainting; |
| 389 break; | 389 break; |
| 390 case WebURLRequest::kFetchRequestModeCORS: | 390 case WebURLRequest::kFetchRequestModeCORS: |
| 391 case WebURLRequest::kFetchRequestModeCORSWithForcedPreflight: | 391 case WebURLRequest::kFetchRequestModeCORSWithForcedPreflight: |
| 392 tainting = FetchRequestData::kCORSTainting; | 392 tainting = FetchRequestData::kCORSTainting; |
| 393 break; | 393 break; |
| 394 case WebURLRequest::kFetchRequestModeNavigate: | 394 case WebURLRequest::kFetchRequestModeNavigate: |
| 395 LOG(FATAL); | 395 LOG(FATAL); |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 loaders_.erase(loader); | 921 loaders_.erase(loader); |
| 922 loader->Dispose(); | 922 loader->Dispose(); |
| 923 } | 923 } |
| 924 | 924 |
| 925 DEFINE_TRACE(FetchManager) { | 925 DEFINE_TRACE(FetchManager) { |
| 926 visitor->Trace(loaders_); | 926 visitor->Trace(loaders_); |
| 927 ContextLifecycleObserver::Trace(visitor); | 927 ContextLifecycleObserver::Trace(visitor); |
| 928 } | 928 } |
| 929 | 929 |
| 930 } // namespace blink | 930 } // namespace blink |
| OLD | NEW |