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

Side by Side Diff: third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp

Issue 2831033002: Use unique_ptr for Platform::CreateURLLoader (Closed)
Patch Set: Created 3 years, 8 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 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 183 }
184 184
185 WebIDBFactory* TestingPlatformSupport::IdbFactory() { 185 WebIDBFactory* TestingPlatformSupport::IdbFactory() {
186 return old_platform_ ? old_platform_->IdbFactory() : nullptr; 186 return old_platform_ ? old_platform_->IdbFactory() : nullptr;
187 } 187 }
188 188
189 WebURLLoaderMockFactory* TestingPlatformSupport::GetURLLoaderMockFactory() { 189 WebURLLoaderMockFactory* TestingPlatformSupport::GetURLLoaderMockFactory() {
190 return old_platform_ ? old_platform_->GetURLLoaderMockFactory() : nullptr; 190 return old_platform_ ? old_platform_->GetURLLoaderMockFactory() : nullptr;
191 } 191 }
192 192
193 WebURLLoader* TestingPlatformSupport::CreateURLLoader() { 193 std::unique_ptr<WebURLLoader> TestingPlatformSupport::CreateURLLoader() {
194 return old_platform_ ? old_platform_->CreateURLLoader() : nullptr; 194 return old_platform_ ? old_platform_->CreateURLLoader() : nullptr;
195 } 195 }
196 196
197 WebData TestingPlatformSupport::LoadResource(const char* name) { 197 WebData TestingPlatformSupport::LoadResource(const char* name) {
198 return old_platform_ ? old_platform_->LoadResource(name) : WebData(); 198 return old_platform_ ? old_platform_->LoadResource(name) : WebData();
199 } 199 }
200 200
201 WebURLError TestingPlatformSupport::CancelledError(const WebURL& url) const { 201 WebURLError TestingPlatformSupport::CancelledError(const WebURL& url) const {
202 return old_platform_ ? old_platform_->CancelledError(url) : WebURLError(); 202 return old_platform_ ? old_platform_->CancelledError(url) : WebURLError();
203 } 203 }
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 ThreadState::AttachMainThread(); 350 ThreadState::AttachMainThread();
351 ThreadState::Current()->RegisterTraceDOMWrappers(nullptr, nullptr, nullptr, 351 ThreadState::Current()->RegisterTraceDOMWrappers(nullptr, nullptr, nullptr,
352 nullptr); 352 nullptr);
353 HTTPNames::init(); 353 HTTPNames::init();
354 FetchInitiatorTypeNames::init(); 354 FetchInitiatorTypeNames::init();
355 } 355 }
356 356
357 ScopedUnittestsEnvironmentSetup::~ScopedUnittestsEnvironmentSetup() {} 357 ScopedUnittestsEnvironmentSetup::~ScopedUnittestsEnvironmentSetup() {}
358 358
359 } // namespace blink 359 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698