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

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

Issue 2140523002: Remove WebURLRequest::initialize() and simplify WebURLRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mutable ref Created 4 years, 5 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 }; 65 };
66 66
67 } // namespace 67 } // namespace
68 68
69 // The purpose of this struct is to permit allocating a ResourceResponse on the 69 // The purpose of this struct is to permit allocating a ResourceResponse on the
70 // heap, which is otherwise disallowed by the DISALLOW_NEW_EXCEPT_PLACEMENT_NEW 70 // heap, which is otherwise disallowed by the DISALLOW_NEW_EXCEPT_PLACEMENT_NEW
71 // annotation on ResourceResponse. 71 // annotation on ResourceResponse.
72 struct WebURLResponse::ResourceResponseContainer { 72 struct WebURLResponse::ResourceResponseContainer {
73 ResourceResponseContainer() {} 73 ResourceResponseContainer() {}
74 74
75 ResourceResponseContainer(const ResourceResponse& r) 75 explicit ResourceResponseContainer(const ResourceResponse& r)
76 : resourceResponse(r) 76 : resourceResponse(r)
77 { 77 {
78 } 78 }
79 79
80 ResourceResponse resourceResponse; 80 ResourceResponse resourceResponse;
81 }; 81 };
82 82
83 WebURLResponse::~WebURLResponse() 83 WebURLResponse::~WebURLResponse()
84 { 84 {
85 } 85 }
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 if (!data) 505 if (!data)
506 return 0; 506 return 0;
507 return static_cast<ExtraDataContainer*>(data.get())->getExtraData(); 507 return static_cast<ExtraDataContainer*>(data.get())->getExtraData();
508 } 508 }
509 509
510 void WebURLResponse::setExtraData(WebURLResponse::ExtraData* extraData) 510 void WebURLResponse::setExtraData(WebURLResponse::ExtraData* extraData)
511 { 511 {
512 m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData)); 512 m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData));
513 } 513 }
514 514
515 WebURLResponse::WebURLResponse(ResourceResponse* p) 515 WebURLResponse::WebURLResponse(ResourceResponse& r)
516 : m_resourceResponse(p) 516 : m_resourceResponse(&r)
517 { 517 {
518 DCHECK(p);
519 } 518 }
520 519
521 } // namespace blink 520 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698