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

Side by Side Diff: storage/browser/quota/quota_manager.cc

Issue 1139323003: Discard duplicate includes of files from storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "storage/browser/quota/quota_manager.h" 5 #include "storage/browser/quota/quota_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque>
9 #include <functional> 8 #include <functional>
10 #include <set>
11 9
12 #include "base/bind.h" 10 #include "base/bind.h"
13 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
14 #include "base/callback.h"
15 #include "base/command_line.h" 12 #include "base/command_line.h"
16 #include "base/files/file_path.h"
17 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
18 #include "base/metrics/histogram.h" 14 #include "base/metrics/histogram.h"
19 #include "base/profiler/scoped_tracker.h" 15 #include "base/profiler/scoped_tracker.h"
20 #include "base/sequenced_task_runner.h" 16 #include "base/sequenced_task_runner.h"
21 #include "base/single_thread_task_runner.h" 17 #include "base/single_thread_task_runner.h"
22 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
23 #include "base/sys_info.h" 19 #include "base/sys_info.h"
24 #include "base/task_runner_util.h" 20 #include "base/task_runner_util.h"
25 #include "base/time/time.h" 21 #include "base/time/time.h"
26 #include "net/base/net_util.h" 22 #include "net/base/net_util.h"
27 #include "storage/browser/quota/client_usage_tracker.h" 23 #include "storage/browser/quota/client_usage_tracker.h"
28 #include "storage/browser/quota/quota_database.h"
29 #include "storage/browser/quota/quota_manager_proxy.h" 24 #include "storage/browser/quota/quota_manager_proxy.h"
30 #include "storage/browser/quota/quota_temporary_storage_evictor.h" 25 #include "storage/browser/quota/quota_temporary_storage_evictor.h"
31 #include "storage/browser/quota/storage_monitor.h" 26 #include "storage/browser/quota/storage_monitor.h"
32 #include "storage/browser/quota/usage_tracker.h" 27 #include "storage/browser/quota/usage_tracker.h"
33 #include "storage/common/quota/quota_types.h" 28 #include "storage/common/quota/quota_types.h"
34 29
35 #define UMA_HISTOGRAM_MBYTES(name, sample) \ 30 #define UMA_HISTOGRAM_MBYTES(name, sample) \
36 UMA_HISTOGRAM_CUSTOM_COUNTS( \ 31 UMA_HISTOGRAM_CUSTOM_COUNTS( \
37 (name), static_cast<int>((sample) / kMBytes), \ 32 (name), static_cast<int>((sample) / kMBytes), \
38 1, 10 * 1024 * 1024 /* 10TB */, 100) 33 1, 10 * 1024 * 1024 /* 10TB */, 100)
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 // |database_|, therefore we can be sure that database_ is alive when this 1622 // |database_|, therefore we can be sure that database_ is alive when this
1628 // task runs. 1623 // task runs.
1629 base::PostTaskAndReplyWithResult( 1624 base::PostTaskAndReplyWithResult(
1630 db_thread_.get(), 1625 db_thread_.get(),
1631 from_here, 1626 from_here,
1632 base::Bind(task, base::Unretained(database_.get())), 1627 base::Bind(task, base::Unretained(database_.get())),
1633 reply); 1628 reply);
1634 } 1629 }
1635 1630
1636 } // namespace storage 1631 } // namespace storage
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698