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

Side by Side Diff: webkit/appcache/appcache_storage.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
« no previous file with comments | « webkit/appcache/appcache_service_unittest.cc ('k') | webkit/appcache/appcache_storage_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/appcache/appcache_storage.h" 5 #include "webkit/appcache/appcache_storage.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "webkit/appcache/appcache_response.h" 10 #include "webkit/appcache/appcache_response.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 AppCacheStorage::ResponseInfoLoadTask::~ResponseInfoLoadTask() { 56 AppCacheStorage::ResponseInfoLoadTask::~ResponseInfoLoadTask() {
57 } 57 }
58 58
59 void AppCacheStorage::ResponseInfoLoadTask::StartIfNeeded() { 59 void AppCacheStorage::ResponseInfoLoadTask::StartIfNeeded() {
60 if (reader_) 60 if (reader_)
61 return; 61 return;
62 reader_.reset( 62 reader_.reset(
63 storage_->CreateResponseReader(manifest_url_, group_id_, response_id_)); 63 storage_->CreateResponseReader(manifest_url_, group_id_, response_id_));
64 reader_->ReadInfo( 64 reader_->ReadInfo(info_buffer_.get(),
65 info_buffer_, base::Bind(&ResponseInfoLoadTask::OnReadComplete, 65 base::Bind(&ResponseInfoLoadTask::OnReadComplete,
66 base::Unretained(this))); 66 base::Unretained(this)));
67 } 67 }
68 68
69 void AppCacheStorage::ResponseInfoLoadTask::OnReadComplete(int result) { 69 void AppCacheStorage::ResponseInfoLoadTask::OnReadComplete(int result) {
70 storage_->pending_info_loads_.erase(response_id_); 70 storage_->pending_info_loads_.erase(response_id_);
71 scoped_refptr<AppCacheResponseInfo> info; 71 scoped_refptr<AppCacheResponseInfo> info;
72 if (result >= 0) { 72 if (result >= 0) {
73 info = new AppCacheResponseInfo(storage_->service(), manifest_url_, 73 info = new AppCacheResponseInfo(storage_->service(), manifest_url_,
74 response_id_, 74 response_id_,
75 info_buffer_->http_info.release(), 75 info_buffer_->http_info.release(),
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 void AppCacheStorage::NotifyStorageAccessed(const GURL& origin) { 127 void AppCacheStorage::NotifyStorageAccessed(const GURL& origin) {
128 if (service()->quota_manager_proxy() && 128 if (service()->quota_manager_proxy() &&
129 usage_map_.find(origin) != usage_map_.end()) 129 usage_map_.find(origin) != usage_map_.end())
130 service()->quota_manager_proxy()->NotifyStorageAccessed( 130 service()->quota_manager_proxy()->NotifyStorageAccessed(
131 quota::QuotaClient::kAppcache, 131 quota::QuotaClient::kAppcache,
132 origin, quota::kStorageTypeTemporary); 132 origin, quota::kStorageTypeTemporary);
133 } 133 }
134 134
135 } // namespace appcache 135 } // namespace appcache
136 136
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_service_unittest.cc ('k') | webkit/appcache/appcache_storage_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698