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

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

Issue 492873002: Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single sto… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build Created 6 years, 4 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/browser/quota/quota_manager.h ('k') | webkit/browser/quota/quota_manager_proxy.h » ('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 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 "webkit/browser/quota/quota_manager.h" 5 #include "webkit/browser/quota/quota_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <functional> 9 #include <functional>
10 #include <set> 10 #include <set>
(...skipping 17 matching lines...) Expand all
28 #include "webkit/browser/quota/quota_temporary_storage_evictor.h" 28 #include "webkit/browser/quota/quota_temporary_storage_evictor.h"
29 #include "webkit/browser/quota/storage_monitor.h" 29 #include "webkit/browser/quota/storage_monitor.h"
30 #include "webkit/browser/quota/usage_tracker.h" 30 #include "webkit/browser/quota/usage_tracker.h"
31 #include "webkit/common/quota/quota_types.h" 31 #include "webkit/common/quota/quota_types.h"
32 32
33 #define UMA_HISTOGRAM_MBYTES(name, sample) \ 33 #define UMA_HISTOGRAM_MBYTES(name, sample) \
34 UMA_HISTOGRAM_CUSTOM_COUNTS( \ 34 UMA_HISTOGRAM_CUSTOM_COUNTS( \
35 (name), static_cast<int>((sample) / kMBytes), \ 35 (name), static_cast<int>((sample) / kMBytes), \
36 1, 10 * 1024 * 1024 /* 10TB */, 100) 36 1, 10 * 1024 * 1024 /* 10TB */, 100)
37 37
38 namespace quota { 38 namespace storage {
39 39
40 namespace { 40 namespace {
41 41
42 const int64 kMBytes = 1024 * 1024; 42 const int64 kMBytes = 1024 * 1024;
43 const int kMinutesInMilliSeconds = 60 * 1000; 43 const int kMinutesInMilliSeconds = 60 * 1000;
44 44
45 const int64 kReportHistogramInterval = 60 * 60 * 1000; // 1 hour 45 const int64 kReportHistogramInterval = 60 * 60 * 1000; // 1 hour
46 const double kTemporaryQuotaRatioToAvail = 1.0 / 3.0; // 33% 46 const double kTemporaryQuotaRatioToAvail = 1.0 / 3.0; // 33%
47 47
48 } // namespace 48 } // namespace
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 // Deleting manager will post another task to DB thread to delete 1621 // Deleting manager will post another task to DB thread to delete
1622 // |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
1623 // task runs. 1623 // task runs.
1624 base::PostTaskAndReplyWithResult( 1624 base::PostTaskAndReplyWithResult(
1625 db_thread_.get(), 1625 db_thread_.get(),
1626 from_here, 1626 from_here,
1627 base::Bind(task, base::Unretained(database_.get())), 1627 base::Bind(task, base::Unretained(database_.get())),
1628 reply); 1628 reply);
1629 } 1629 }
1630 1630
1631 } // namespace quota 1631 } // namespace storage
OLDNEW
« no previous file with comments | « webkit/browser/quota/quota_manager.h ('k') | webkit/browser/quota/quota_manager_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698