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

Side by Side Diff: content/browser/appcache/appcache_service_impl.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/appcache/appcache_service_impl.h" 5 #include "content/browser/appcache/appcache_service_impl.h"
6 6
7 #include <functional> 7 #include <functional>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 void OnReadDataComplete(int result); 287 void OnReadDataComplete(int result);
288 288
289 // Inputs describing what to check. 289 // Inputs describing what to check.
290 GURL manifest_url_; 290 GURL manifest_url_;
291 int64_t cache_id_; 291 int64_t cache_id_;
292 int64_t response_id_; 292 int64_t response_id_;
293 293
294 // Internals used to perform the checks. 294 // Internals used to perform the checks.
295 const int kIOBufferSize; 295 const int kIOBufferSize;
296 scoped_refptr<AppCache> cache_; 296 scoped_refptr<AppCache> cache_;
297 scoped_ptr<AppCacheResponseReader> response_reader_; 297 std::unique_ptr<AppCacheResponseReader> response_reader_;
298 scoped_refptr<HttpResponseInfoIOBuffer> info_buffer_; 298 scoped_refptr<HttpResponseInfoIOBuffer> info_buffer_;
299 scoped_refptr<net::IOBuffer> data_buffer_; 299 scoped_refptr<net::IOBuffer> data_buffer_;
300 int64_t expected_total_size_; 300 int64_t expected_total_size_;
301 int amount_headers_read_; 301 int amount_headers_read_;
302 int amount_data_read_; 302 int amount_data_read_;
303 DISALLOW_COPY_AND_ASSIGN(CheckResponseHelper); 303 DISALLOW_COPY_AND_ASSIGN(CheckResponseHelper);
304 }; 304 };
305 305
306 void AppCacheServiceImpl::CheckResponseHelper::OnGroupLoaded( 306 void AppCacheServiceImpl::CheckResponseHelper::OnGroupLoaded(
307 AppCacheGroup* group, const GURL& manifest_url) { 307 AppCacheGroup* group, const GURL& manifest_url) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 AppCacheHistograms::CountCheckResponseResult(check_result); 382 AppCacheHistograms::CountCheckResponseResult(check_result);
383 383
384 if (check_result != AppCacheHistograms::RESPONSE_OK) 384 if (check_result != AppCacheHistograms::RESPONSE_OK)
385 service_->DeleteAppCacheGroup(manifest_url_, net::CompletionCallback()); 385 service_->DeleteAppCacheGroup(manifest_url_, net::CompletionCallback());
386 delete this; 386 delete this;
387 } 387 }
388 388
389 // AppCacheStorageReference ------ 389 // AppCacheStorageReference ------
390 390
391 AppCacheStorageReference::AppCacheStorageReference( 391 AppCacheStorageReference::AppCacheStorageReference(
392 scoped_ptr<AppCacheStorage> storage) 392 std::unique_ptr<AppCacheStorage> storage)
393 : storage_(std::move(storage)) {} 393 : storage_(std::move(storage)) {}
394 AppCacheStorageReference::~AppCacheStorageReference() {} 394 AppCacheStorageReference::~AppCacheStorageReference() {}
395 395
396 // AppCacheServiceImpl ------- 396 // AppCacheServiceImpl -------
397 397
398 AppCacheServiceImpl::AppCacheServiceImpl( 398 AppCacheServiceImpl::AppCacheServiceImpl(
399 storage::QuotaManagerProxy* quota_manager_proxy) 399 storage::QuotaManagerProxy* quota_manager_proxy)
400 : appcache_policy_(NULL), 400 : appcache_policy_(NULL),
401 quota_client_(NULL), 401 quota_client_(NULL),
402 handler_factory_(NULL), 402 handler_factory_(NULL),
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 backends_.insert( 517 backends_.insert(
518 BackendMap::value_type(backend_impl->process_id(), backend_impl)); 518 BackendMap::value_type(backend_impl->process_id(), backend_impl));
519 } 519 }
520 520
521 void AppCacheServiceImpl::UnregisterBackend( 521 void AppCacheServiceImpl::UnregisterBackend(
522 AppCacheBackendImpl* backend_impl) { 522 AppCacheBackendImpl* backend_impl) {
523 backends_.erase(backend_impl->process_id()); 523 backends_.erase(backend_impl->process_id());
524 } 524 }
525 525
526 } // namespace content 526 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_service_impl.h ('k') | content/browser/appcache/appcache_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698