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

Side by Side Diff: storage/browser/fileapi/sandbox_file_system_backend_delegate.cc

Issue 2236453002: storage: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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/fileapi/sandbox_file_system_backend_delegate.h" 5 #include "storage/browser/fileapi/sandbox_file_system_backend_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 } 386 }
387 387
388 int64_t SandboxFileSystemBackendDelegate::GetOriginUsageOnFileTaskRunner( 388 int64_t SandboxFileSystemBackendDelegate::GetOriginUsageOnFileTaskRunner(
389 FileSystemContext* file_system_context, 389 FileSystemContext* file_system_context,
390 const GURL& origin_url, 390 const GURL& origin_url,
391 FileSystemType type) { 391 FileSystemType type) {
392 DCHECK(file_task_runner_->RunsTasksOnCurrentThread()); 392 DCHECK(file_task_runner_->RunsTasksOnCurrentThread());
393 393
394 // Don't use usage cache and return recalculated usage for sticky invalidated 394 // Don't use usage cache and return recalculated usage for sticky invalidated
395 // origins. 395 // origins.
396 if (ContainsKey(sticky_dirty_origins_, std::make_pair(origin_url, type))) 396 if (base::ContainsKey(sticky_dirty_origins_,
397 std::make_pair(origin_url, type)))
397 return RecalculateUsage(file_system_context, origin_url, type); 398 return RecalculateUsage(file_system_context, origin_url, type);
398 399
399 base::FilePath base_path = 400 base::FilePath base_path =
400 GetBaseDirectoryForOriginAndType(origin_url, type, false); 401 GetBaseDirectoryForOriginAndType(origin_url, type, false);
401 if (base_path.empty() || !base::DirectoryExists(base_path)) 402 if (base_path.empty() || !base::DirectoryExists(base_path))
402 return 0; 403 return 0;
403 base::FilePath usage_file_path = 404 base::FilePath usage_file_path =
404 base_path.Append(FileSystemUsageCache::kUsageFileName); 405 base_path.Append(FileSystemUsageCache::kUsageFileName);
405 406
406 bool is_valid = usage_cache()->IsValid(usage_file_path); 407 bool is_valid = usage_cache()->IsValid(usage_file_path);
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 return new ObfuscatedFileUtil(special_storage_policy, 696 return new ObfuscatedFileUtil(special_storage_policy,
696 file_system_directory, 697 file_system_directory,
697 env_override, 698 env_override,
698 file_task_runner, 699 file_task_runner,
699 base::Bind(&GetTypeStringForURL), 700 base::Bind(&GetTypeStringForURL),
700 GetKnownTypeStrings(), 701 GetKnownTypeStrings(),
701 NULL); 702 NULL);
702 } 703 }
703 704
704 } // namespace storage 705 } // namespace storage
OLDNEW
« no previous file with comments | « storage/browser/fileapi/plugin_private_file_system_backend.cc ('k') | storage/browser/quota/client_usage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698