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

Side by Side Diff: storage/browser/fileapi/external_mount_points.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/external_mount_points.h" 5 #include "storage/browser/fileapi/external_mount_points.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 247
248 void ExternalMountPoints::RevokeAllFileSystems() { 248 void ExternalMountPoints::RevokeAllFileSystems() {
249 NameToInstance instance_map_copy; 249 NameToInstance instance_map_copy;
250 { 250 {
251 base::AutoLock locker(lock_); 251 base::AutoLock locker(lock_);
252 instance_map_copy = instance_map_; 252 instance_map_copy = instance_map_;
253 instance_map_.clear(); 253 instance_map_.clear();
254 path_to_name_map_.clear(); 254 path_to_name_map_.clear();
255 } 255 }
256 STLDeleteContainerPairSecondPointers(instance_map_copy.begin(), 256 base::STLDeleteContainerPairSecondPointers(instance_map_copy.begin(),
257 instance_map_copy.end()); 257 instance_map_copy.end());
258 } 258 }
259 259
260 ExternalMountPoints::ExternalMountPoints() {} 260 ExternalMountPoints::ExternalMountPoints() {}
261 261
262 ExternalMountPoints::~ExternalMountPoints() { 262 ExternalMountPoints::~ExternalMountPoints() {
263 STLDeleteContainerPairSecondPointers(instance_map_.begin(), 263 base::STLDeleteContainerPairSecondPointers(instance_map_.begin(),
264 instance_map_.end()); 264 instance_map_.end());
265 } 265 }
266 266
267 FileSystemURL ExternalMountPoints::CrackFileSystemURL( 267 FileSystemURL ExternalMountPoints::CrackFileSystemURL(
268 const FileSystemURL& url) const { 268 const FileSystemURL& url) const {
269 if (!HandlesFileSystemMountType(url.type())) 269 if (!HandlesFileSystemMountType(url.type()))
270 return FileSystemURL(); 270 return FileSystemURL();
271 271
272 base::FilePath virtual_path = url.path(); 272 base::FilePath virtual_path = url.path();
273 if (url.type() == kFileSystemTypeNativeForPlatformApp) { 273 if (url.type() == kFileSystemTypeNativeForPlatformApp) {
274 #if defined(OS_CHROMEOS) 274 #if defined(OS_CHROMEOS)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 path.IsParent(potential_child->first)) { 342 path.IsParent(potential_child->first)) {
343 return false; 343 return false;
344 } 344 }
345 } 345 }
346 } 346 }
347 347
348 return true; 348 return true;
349 } 349 }
350 350
351 } // namespace storage 351 } // namespace storage
OLDNEW
« no previous file with comments | « storage/browser/fileapi/copy_or_move_operation_delegate.cc ('k') | storage/browser/fileapi/file_system_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698