OLD | NEW |
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/browser/profiles/profile.h" | 6 #include "chrome/browser/profiles/profile.h" |
7 #include "components/browsing_data/pref_names.h" | 7 #include "components/browsing_data/content/storage_partition_http_cache_data_rem
over.h" |
8 #include "components/browsing_data/storage_partition_http_cache_data_remover.h" | 8 #include "components/browsing_data/core/pref_names.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 | 10 |
11 CacheCounter::CacheCounter(Profile* profile) | 11 CacheCounter::CacheCounter(Profile* profile) |
12 : BrowsingDataCounter(browsing_data::prefs::kDeleteCache), | 12 : BrowsingDataCounter(browsing_data::prefs::kDeleteCache), |
13 profile_(profile), | 13 profile_(profile), |
14 pending_(false), | 14 pending_(false), |
15 weak_ptr_factory_(this) {} | 15 weak_ptr_factory_(this) {} |
16 | 16 |
17 CacheCounter::~CacheCounter() { | 17 CacheCounter::~CacheCounter() { |
18 } | 18 } |
(...skipping 18 matching lines...) Expand all Loading... |
37 // A value less than 0 means a net error code. | 37 // A value less than 0 means a net error code. |
38 if (result_bytes < 0) | 38 if (result_bytes < 0) |
39 return; | 39 return; |
40 | 40 |
41 ReportResult(result_bytes); | 41 ReportResult(result_bytes); |
42 } | 42 } |
43 | 43 |
44 bool CacheCounter::Pending() { | 44 bool CacheCounter::Pending() { |
45 return pending_; | 45 return pending_; |
46 } | 46 } |
OLD | NEW |