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

Side by Side Diff: WebKit/chromium/src/WebBlob.cpp

Issue 11192017: ********** WebCore blob hacking (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/Source/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « WebKit/chromium/src/LocalFileSystemChromium.cpp ('k') | WebKit/chromium/src/WebBlobData.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 26 matching lines...) Expand all
37 #include <wtf/PassOwnPtr.h> 37 #include <wtf/PassOwnPtr.h>
38 38
39 using namespace WebCore; 39 using namespace WebCore;
40 40
41 namespace WebKit { 41 namespace WebKit {
42 42
43 WebBlob WebBlob::createFromFile(const WebString& path, long long size) 43 WebBlob WebBlob::createFromFile(const WebString& path, long long size)
44 { 44 {
45 OwnPtr<BlobData> blobData = BlobData::create(); 45 OwnPtr<BlobData> blobData = BlobData::create();
46 blobData->appendFile(path); 46 blobData->appendFile(path);
47 RefPtr<Blob> blob = Blob::create(blobData.release(), size); 47 RefPtr<Blob> blob = Blob::create(BlobDataHandle::create(blobData.release(), size));
48 return WebBlob(blob); 48 return WebBlob(blob);
49 } 49 }
50 50
51 void WebBlob::reset() 51 void WebBlob::reset()
52 { 52 {
53 m_private.reset(); 53 m_private.reset();
54 } 54 }
55 55
56 void WebBlob::assign(const WebBlob& other) 56 void WebBlob::assign(const WebBlob& other)
57 { 57 {
(...skipping 19 matching lines...) Expand all
77 m_private = blob; 77 m_private = blob;
78 return *this; 78 return *this;
79 } 79 }
80 80
81 WebBlob::operator WTF::PassRefPtr<WebCore::Blob>() const 81 WebBlob::operator WTF::PassRefPtr<WebCore::Blob>() const
82 { 82 {
83 return m_private.get(); 83 return m_private.get();
84 } 84 }
85 85
86 } // namespace WebKit 86 } // namespace WebKit
OLDNEW
« no previous file with comments | « WebKit/chromium/src/LocalFileSystemChromium.cpp ('k') | WebKit/chromium/src/WebBlobData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698