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

Side by Side Diff: webkit/blob/blob_storage_controller.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/blob/blob_storage_controller.h" 5 #include "webkit/blob/blob_storage_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "net/base/upload_data.h" 9 #include "net/base/upload_data.h"
10 #include "webkit/blob/blob_data.h" 10 #include "webkit/blob/blob_data.h"
11 11
12 namespace webkit_blob { 12 namespace webkit_blob {
13 13
14 BlobStorageController::BlobStorageController() { 14 BlobStorageController::BlobStorageController() {
15 } 15 }
16 16
17 BlobStorageController::~BlobStorageController() { 17 BlobStorageController::~BlobStorageController() {
18 } 18 }
19 19
20 void BlobStorageController::RegisterBlobUrl( 20 void BlobStorageController::RegisterBlobUrl(
21 const GURL& url, const BlobData* blob_data) { 21 const GURL& url, const BlobData* blob_data) {
22 scoped_refptr<BlobData> target_blob_data = new BlobData(); 22 scoped_refptr<BlobData> target_blob_data(new BlobData());
23 target_blob_data->set_content_type(blob_data->content_type()); 23 target_blob_data->set_content_type(blob_data->content_type());
24 target_blob_data->set_content_disposition(blob_data->content_disposition()); 24 target_blob_data->set_content_disposition(blob_data->content_disposition());
25 25
26 // The blob data is stored in the "canonical" way. That is, it only contains a 26 // The blob data is stored in the "canonical" way. That is, it only contains a
27 // list of Data and File items. 27 // list of Data and File items.
28 // 1) The Data item is denoted by the raw data and the range. 28 // 1) The Data item is denoted by the raw data and the range.
29 // 2) The File item is denoted by the file path, the range and the expected 29 // 2) The File item is denoted by the file path, the range and the expected
30 // modification time. 30 // modification time.
31 // All the Blob items in the passing blob data are resolved and expanded into 31 // All the Blob items in the passing blob data are resolved and expanded into
32 // a set of Data and File items. 32 // a set of Data and File items.
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 expected_modification_time); 189 expected_modification_time);
190 190
191 // It may be a temporary file that should be deleted when no longer needed. 191 // It may be a temporary file that should be deleted when no longer needed.
192 scoped_refptr<DeletableFileReference> deletable_file = 192 scoped_refptr<DeletableFileReference> deletable_file =
193 DeletableFileReference::Get(file_path); 193 DeletableFileReference::Get(file_path);
194 if (deletable_file) 194 if (deletable_file)
195 target_blob_data->AttachDeletableFileReference(deletable_file); 195 target_blob_data->AttachDeletableFileReference(deletable_file);
196 } 196 }
197 197
198 } // namespace webkit_blob 198 } // namespace webkit_blob
OLDNEW
« no previous file with comments | « webkit/appcache/mock_appcache_storage_unittest.cc ('k') | webkit/blob/blob_storage_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698