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

Side by Side Diff: chrome/browser/browsing_data/cache_counter.cc

Issue 1542413002: Switch to standard integer types in chrome/browser/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 "chrome/browser/browsing_data/cache_counter.h" 5 #include "chrome/browser/browsing_data/cache_counter.h"
6 #include "chrome/common/pref_names.h" 6 #include "chrome/common/pref_names.h"
7 #include "components/browsing_data/storage_partition_http_cache_data_remover.h" 7 #include "components/browsing_data/storage_partition_http_cache_data_remover.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 9
10 CacheCounter::CacheCounter() : pref_name_(prefs::kDeleteCache), 10 CacheCounter::CacheCounter() : pref_name_(prefs::kDeleteCache),
(...skipping 16 matching lines...) Expand all
27 // for finite time intervals as upper estimates. 27 // for finite time intervals as upper estimates.
28 browsing_data::StoragePartitionHttpCacheDataRemover::CreateForRange( 28 browsing_data::StoragePartitionHttpCacheDataRemover::CreateForRange(
29 content::BrowserContext::GetDefaultStoragePartition(GetProfile()), 29 content::BrowserContext::GetDefaultStoragePartition(GetProfile()),
30 base::Time(), 30 base::Time(),
31 base::Time::Max())->Count( 31 base::Time::Max())->Count(
32 base::Bind(&CacheCounter::OnCacheSizeCalculated, 32 base::Bind(&CacheCounter::OnCacheSizeCalculated,
33 weak_ptr_factory_.GetWeakPtr())); 33 weak_ptr_factory_.GetWeakPtr()));
34 pending_ = true; 34 pending_ = true;
35 } 35 }
36 36
37 void CacheCounter::OnCacheSizeCalculated(int64 result_bytes) { 37 void CacheCounter::OnCacheSizeCalculated(int64_t result_bytes) {
38 pending_ = false; 38 pending_ = false;
39 39
40 // A value less than 0 means a net error code. 40 // A value less than 0 means a net error code.
41 if (result_bytes < 0) 41 if (result_bytes < 0)
42 return; 42 return;
43 43
44 ReportResult(result_bytes); 44 ReportResult(result_bytes);
45 } 45 }
46 46
47 bool CacheCounter::Pending() { 47 bool CacheCounter::Pending() {
48 return pending_; 48 return pending_;
49 } 49 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/cache_counter.h ('k') | chrome/browser/browsing_data/canonical_cookie_hash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698