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

Side by Side Diff: webkit/browser/blob/mock_blob_url_request_context.cc

Issue 16155009: Update webkit/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/browser/blob/mock_blob_url_request_context.h" 5 #include "webkit/browser/blob/mock_blob_url_request_context.h"
6 6
7 #include "webkit/browser/blob/blob_storage_controller.h" 7 #include "webkit/browser/blob/blob_storage_controller.h"
8 #include "webkit/browser/blob/blob_url_request_job.h" 8 #include "webkit/browser/blob/blob_url_request_job.h"
9 #include "webkit/common/blob/blob_data.h" 9 #include "webkit/common/blob/blob_data.h"
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 ScopedTextBlob::ScopedTextBlob( 58 ScopedTextBlob::ScopedTextBlob(
59 const MockBlobURLRequestContext& request_context, 59 const MockBlobURLRequestContext& request_context,
60 const GURL& blob_url, 60 const GURL& blob_url,
61 const std::string& data) 61 const std::string& data)
62 : blob_url_(blob_url), 62 : blob_url_(blob_url),
63 blob_storage_controller_(request_context.blob_storage_controller()) { 63 blob_storage_controller_(request_context.blob_storage_controller()) {
64 DCHECK(blob_storage_controller_); 64 DCHECK(blob_storage_controller_);
65 scoped_refptr<BlobData> blob_data(new BlobData()); 65 scoped_refptr<BlobData> blob_data(new BlobData());
66 blob_data->AppendData(data); 66 blob_data->AppendData(data);
67 blob_storage_controller_->AddFinishedBlob(blob_url_, blob_data); 67 blob_storage_controller_->AddFinishedBlob(blob_url_, blob_data.get());
68 } 68 }
69 69
70 ScopedTextBlob::~ScopedTextBlob() { 70 ScopedTextBlob::~ScopedTextBlob() {
71 blob_storage_controller_->RemoveBlob(blob_url_); 71 blob_storage_controller_->RemoveBlob(blob_url_);
72 } 72 }
73 73
74 } // namespace webkit_blob 74 } // namespace webkit_blob
OLDNEW
« no previous file with comments | « webkit/browser/blob/local_file_stream_reader_unittest.cc ('k') | webkit/browser/blob/view_blob_internals_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698