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

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

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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_database_unittest.cc ('k') | no next file » | 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 bool UpdateModifiedTimeOnDBThread(const GURL& origin, 192 bool UpdateModifiedTimeOnDBThread(const GURL& origin,
193 StorageType type, 193 StorageType type,
194 base::Time modified_time, 194 base::Time modified_time,
195 QuotaDatabase* database) { 195 QuotaDatabase* database) {
196 DCHECK(database); 196 DCHECK(database);
197 return database->SetOriginLastModifiedTime(origin, type, modified_time); 197 return database->SetOriginLastModifiedTime(origin, type, modified_time);
198 } 198 }
199 199
200 int64 CallSystemGetAmountOfFreeDiskSpace(const base::FilePath& profile_path) { 200 int64 CallSystemGetAmountOfFreeDiskSpace(const base::FilePath& profile_path) {
201 // Ensure the profile path exists. 201 // Ensure the profile path exists.
202 if(!file_util::CreateDirectory(profile_path)) { 202 if(!base::CreateDirectory(profile_path)) {
203 LOG(WARNING) << "Create directory failed for path" << profile_path.value(); 203 LOG(WARNING) << "Create directory failed for path" << profile_path.value();
204 return 0; 204 return 0;
205 } 205 }
206 return base::SysInfo::AmountOfFreeDiskSpace(profile_path); 206 return base::SysInfo::AmountOfFreeDiskSpace(profile_path);
207 } 207 }
208 208
209 int64 CalculateTemporaryGlobalQuota(int64 global_limited_usage, 209 int64 CalculateTemporaryGlobalQuota(int64 global_limited_usage,
210 int64 available_space) { 210 int64 available_space) {
211 DCHECK_GE(global_limited_usage, 0); 211 DCHECK_GE(global_limited_usage, 0);
212 int64 avail_space = available_space; 212 int64 avail_space = available_space;
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 1725
1726 QuotaManagerProxy::QuotaManagerProxy( 1726 QuotaManagerProxy::QuotaManagerProxy(
1727 QuotaManager* manager, base::SingleThreadTaskRunner* io_thread) 1727 QuotaManager* manager, base::SingleThreadTaskRunner* io_thread)
1728 : manager_(manager), io_thread_(io_thread) { 1728 : manager_(manager), io_thread_(io_thread) {
1729 } 1729 }
1730 1730
1731 QuotaManagerProxy::~QuotaManagerProxy() { 1731 QuotaManagerProxy::~QuotaManagerProxy() {
1732 } 1732 }
1733 1733
1734 } // namespace quota 1734 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/browser/quota/quota_database_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698