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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/ResponseTest.cpp

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 years, 1 month 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 "modules/fetch/Response.h" 5 #include "modules/fetch/Response.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "bindings/core/v8/ScriptState.h" 8 #include "bindings/core/v8/ScriptState.h"
9 #include "bindings/core/v8/V8BindingForTesting.h" 9 #include "bindings/core/v8/V8BindingForTesting.h"
10 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
(...skipping 20 matching lines...) Expand all
31 const String statusText = "the best status text"; 31 const String statusText = "the best status text";
32 struct { 32 struct {
33 const char* key; 33 const char* key;
34 const char* value; 34 const char* value;
35 } headers[] = {{"cache-control", "no-cache"}, 35 } headers[] = {{"cache-control", "no-cache"},
36 {"set-cookie", "foop"}, 36 {"set-cookie", "foop"},
37 {"foo", "bar"}, 37 {"foo", "bar"},
38 {0, 0}}; 38 {0, 0}};
39 39
40 std::unique_ptr<WebServiceWorkerResponse> webResponse = 40 std::unique_ptr<WebServiceWorkerResponse> webResponse =
41 wrapUnique(new WebServiceWorkerResponse()); 41 makeUnique<WebServiceWorkerResponse>();
42 webResponse->setURL(url); 42 webResponse->setURL(url);
43 webResponse->setStatus(status); 43 webResponse->setStatus(status);
44 webResponse->setStatusText(statusText); 44 webResponse->setStatusText(statusText);
45 webResponse->setResponseType(WebServiceWorkerResponseTypeDefault); 45 webResponse->setResponseType(WebServiceWorkerResponseTypeDefault);
46 for (int i = 0; headers[i].key; ++i) 46 for (int i = 0; headers[i].key; ++i)
47 webResponse->setHeader(WebString::fromUTF8(headers[i].key), 47 webResponse->setHeader(WebString::fromUTF8(headers[i].key),
48 WebString::fromUTF8(headers[i].value)); 48 WebString::fromUTF8(headers[i].value));
49 return webResponse; 49 return webResponse;
50 } 50 }
51 51
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 response->internalBodyBuffer()->startLoading( 294 response->internalBodyBuffer()->startLoading(
295 FetchDataLoader::createLoaderAsString(), client1); 295 FetchDataLoader::createLoaderAsString(), client1);
296 clonedResponse->internalBodyBuffer()->startLoading( 296 clonedResponse->internalBodyBuffer()->startLoading(
297 FetchDataLoader::createLoaderAsString(), client2); 297 FetchDataLoader::createLoaderAsString(), client2);
298 blink::testing::runPendingTasks(); 298 blink::testing::runPendingTasks();
299 } 299 }
300 300
301 } // namespace 301 } // namespace
302 } // namespace blink 302 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp ('k') | third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698