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

Side by Side Diff: third_party/WebKit/Source/platform/network/ResourceResponse.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 17 matching lines...) Expand all
28 #define ResourceResponse_h 28 #define ResourceResponse_h
29 29
30 #include "platform/PlatformExport.h" 30 #include "platform/PlatformExport.h"
31 #include "platform/blob/BlobData.h" 31 #include "platform/blob/BlobData.h"
32 #include "platform/network/HTTPHeaderMap.h" 32 #include "platform/network/HTTPHeaderMap.h"
33 #include "platform/network/HTTPParsers.h" 33 #include "platform/network/HTTPParsers.h"
34 #include "platform/network/ResourceLoadInfo.h" 34 #include "platform/network/ResourceLoadInfo.h"
35 #include "platform/network/ResourceLoadTiming.h" 35 #include "platform/network/ResourceLoadTiming.h"
36 #include "platform/weborigin/KURL.h" 36 #include "platform/weborigin/KURL.h"
37 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h" 37 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h"
38 #include "wtf/PassOwnPtr.h"
39 #include "wtf/RefCounted.h" 38 #include "wtf/RefCounted.h"
40 #include "wtf/RefPtr.h" 39 #include "wtf/RefPtr.h"
41 #include "wtf/text/CString.h" 40 #include "wtf/text/CString.h"
41 #include <memory>
42 42
43 namespace blink { 43 namespace blink {
44 44
45 struct CrossThreadResourceResponseData; 45 struct CrossThreadResourceResponseData;
46 46
47 class PLATFORM_EXPORT ResourceResponse final { 47 class PLATFORM_EXPORT ResourceResponse final {
48 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 48 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
49 public: 49 public:
50 enum HTTPVersion { HTTPVersionUnknown, 50 enum HTTPVersion { HTTPVersionUnknown,
51 HTTPVersion_0_9, 51 HTTPVersion_0_9,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 }; 83 };
84 84
85 class ExtraData : public RefCounted<ExtraData> { 85 class ExtraData : public RefCounted<ExtraData> {
86 public: 86 public:
87 virtual ~ExtraData() { } 87 virtual ~ExtraData() { }
88 }; 88 };
89 89
90 explicit ResourceResponse(CrossThreadResourceResponseData*); 90 explicit ResourceResponse(CrossThreadResourceResponseData*);
91 91
92 // Gets a copy of the data suitable for passing to another thread. 92 // Gets a copy of the data suitable for passing to another thread.
93 PassOwnPtr<CrossThreadResourceResponseData> copyData() const; 93 std::unique_ptr<CrossThreadResourceResponseData> copyData() const;
94 94
95 ResourceResponse(); 95 ResourceResponse();
96 ResourceResponse(const KURL&, const AtomicString& mimeType, long long expect edLength, const AtomicString& textEncodingName, const String& filename); 96 ResourceResponse(const KURL&, const AtomicString& mimeType, long long expect edLength, const AtomicString& textEncodingName, const String& filename);
97 97
98 bool isNull() const { return m_isNull; } 98 bool isNull() const { return m_isNull; }
99 bool isHTTP() const; 99 bool isHTTP() const;
100 100
101 const KURL& url() const; 101 const KURL& url() const;
102 void setURL(const KURL&); 102 void setURL(const KURL&);
103 103
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 WTF_MAKE_NONCOPYABLE(CrossThreadResourceResponseData); USING_FAST_MALLOC(Cro ssThreadResourceResponseData); 384 WTF_MAKE_NONCOPYABLE(CrossThreadResourceResponseData); USING_FAST_MALLOC(Cro ssThreadResourceResponseData);
385 public: 385 public:
386 CrossThreadResourceResponseData() { } 386 CrossThreadResourceResponseData() { }
387 KURL m_url; 387 KURL m_url;
388 String m_mimeType; 388 String m_mimeType;
389 long long m_expectedContentLength; 389 long long m_expectedContentLength;
390 String m_textEncodingName; 390 String m_textEncodingName;
391 String m_suggestedFilename; 391 String m_suggestedFilename;
392 int m_httpStatusCode; 392 int m_httpStatusCode;
393 String m_httpStatusText; 393 String m_httpStatusText;
394 OwnPtr<CrossThreadHTTPHeaderMapData> m_httpHeaders; 394 std::unique_ptr<CrossThreadHTTPHeaderMapData> m_httpHeaders;
395 time_t m_lastModifiedDate; 395 time_t m_lastModifiedDate;
396 RefPtr<ResourceLoadTiming> m_resourceLoadTiming; 396 RefPtr<ResourceLoadTiming> m_resourceLoadTiming;
397 CString m_securityInfo; 397 CString m_securityInfo;
398 bool m_hasMajorCertificateErrors; 398 bool m_hasMajorCertificateErrors;
399 ResourceResponse::SecurityStyle m_securityStyle; 399 ResourceResponse::SecurityStyle m_securityStyle;
400 ResourceResponse::SecurityDetails m_securityDetails; 400 ResourceResponse::SecurityDetails m_securityDetails;
401 ResourceResponse::HTTPVersion m_httpVersion; 401 ResourceResponse::HTTPVersion m_httpVersion;
402 long long m_appCacheID; 402 long long m_appCacheID;
403 KURL m_appCacheManifestURL; 403 KURL m_appCacheManifestURL;
404 Vector<char> m_multipartBoundary; 404 Vector<char> m_multipartBoundary;
405 bool m_wasFetchedViaSPDY; 405 bool m_wasFetchedViaSPDY;
406 bool m_wasNpnNegotiated; 406 bool m_wasNpnNegotiated;
407 bool m_wasAlternateProtocolAvailable; 407 bool m_wasAlternateProtocolAvailable;
408 bool m_wasFetchedViaProxy; 408 bool m_wasFetchedViaProxy;
409 bool m_wasFetchedViaServiceWorker; 409 bool m_wasFetchedViaServiceWorker;
410 bool m_wasFallbackRequiredByServiceWorker; 410 bool m_wasFallbackRequiredByServiceWorker;
411 WebServiceWorkerResponseType m_serviceWorkerResponseType; 411 WebServiceWorkerResponseType m_serviceWorkerResponseType;
412 KURL m_originalURLViaServiceWorker; 412 KURL m_originalURLViaServiceWorker;
413 String m_cacheStorageCacheName; 413 String m_cacheStorageCacheName;
414 int64_t m_responseTime; 414 int64_t m_responseTime;
415 String m_remoteIPAddress; 415 String m_remoteIPAddress;
416 unsigned short m_remotePort; 416 unsigned short m_remotePort;
417 String m_downloadedFilePath; 417 String m_downloadedFilePath;
418 RefPtr<BlobDataHandle> m_downloadedFileHandle; 418 RefPtr<BlobDataHandle> m_downloadedFileHandle;
419 }; 419 };
420 420
421 } // namespace blink 421 } // namespace blink
422 422
423 #endif // ResourceResponse_h 423 #endif // ResourceResponse_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698