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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebURLResponse.cpp

Issue 2733283004: Expose WebServiceWorkerNetworkProvider on DataSource (Closed)
Patch Set: consistency 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 } 362 }
363 363
364 WebURLResponse::ExtraData* WebURLResponse::getExtraData() const { 364 WebURLResponse::ExtraData* WebURLResponse::getExtraData() const {
365 RefPtr<ResourceResponse::ExtraData> data = m_resourceResponse->getExtraData(); 365 RefPtr<ResourceResponse::ExtraData> data = m_resourceResponse->getExtraData();
366 if (!data) 366 if (!data)
367 return 0; 367 return 0;
368 return static_cast<ExtraDataContainer*>(data.get())->getExtraData(); 368 return static_cast<ExtraDataContainer*>(data.get())->getExtraData();
369 } 369 }
370 370
371 void WebURLResponse::setExtraData(WebURLResponse::ExtraData* extraData) { 371 void WebURLResponse::setExtraData(WebURLResponse::ExtraData* extraData) {
372 m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData)); 372 if (extraData != getExtraData())
373 m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData));
373 } 374 }
374 375
375 void WebURLResponse::appendRedirectResponse(const WebURLResponse& response) { 376 void WebURLResponse::appendRedirectResponse(const WebURLResponse& response) {
376 m_resourceResponse->appendRedirectResponse(response.toResourceResponse()); 377 m_resourceResponse->appendRedirectResponse(response.toResourceResponse());
377 } 378 }
378 379
379 WebURLResponse::WebURLResponse(ResourceResponse& r) : m_resourceResponse(&r) {} 380 WebURLResponse::WebURLResponse(ResourceResponse& r) : m_resourceResponse(&r) {}
380 381
381 } // namespace blink 382 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/exported/WebURLRequest.cpp ('k') | third_party/WebKit/Source/web/LocalFrameClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698