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

Side by Side Diff: webkit/browser/fileapi/external_mount_points.cc

Issue 15859007: Move browser-specific FileAPI code from webkit/fileapi to webkit/browser/fileapi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dump_file_system build fix Created 7 years, 6 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
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 "webkit/browser/fileapi/external_mount_points.h" 5 #include "webkit/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/path_service.h" 9 #include "base/path_service.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "webkit/fileapi/file_system_url.h" 11 #include "webkit/browser/fileapi/file_system_url.h"
12 #include "webkit/fileapi/remote_file_system_proxy.h" 12 #include "webkit/browser/fileapi/remote_file_system_proxy.h"
13 13
14 namespace { 14 namespace {
15 15
16 // Normalizes file path so it has normalized separators and ends with exactly 16 // Normalizes file path so it has normalized separators and ends with exactly
17 // one separator. Paths have to be normalized this way for use in 17 // one separator. Paths have to be normalized this way for use in
18 // GetVirtualPath method. Separators cannot be completely stripped, or 18 // GetVirtualPath method. Separators cannot be completely stripped, or
19 // GetVirtualPath could not working in some edge cases. 19 // GetVirtualPath could not working in some edge cases.
20 // For example, /a/b/c(1)/d would be erroneously resolved as c/d if the 20 // For example, /a/b/c(1)/d would be erroneously resolved as c/d if the
21 // following mount points were registered: "/a/b/c", "/a/b/c(1)". (Note: 21 // following mount points were registered: "/a/b/c", "/a/b/c(1)". (Note:
22 // "/a/b/c" < "/a/b/c(1)" < "/a/b/c/"). 22 // "/a/b/c" < "/a/b/c(1)" < "/a/b/c/").
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 base::FilePath ScopedExternalFileSystem::GetVirtualRootPath() const { 350 base::FilePath ScopedExternalFileSystem::GetVirtualRootPath() const {
351 return ExternalMountPoints::GetSystemInstance()-> 351 return ExternalMountPoints::GetSystemInstance()->
352 CreateVirtualRootPath(mount_name_); 352 CreateVirtualRootPath(mount_name_);
353 } 353 }
354 354
355 ScopedExternalFileSystem::~ScopedExternalFileSystem() { 355 ScopedExternalFileSystem::~ScopedExternalFileSystem() {
356 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(mount_name_); 356 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(mount_name_);
357 } 357 }
358 358
359 } // namespace fileapi 359 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/dump_file_system.cc ('k') | webkit/browser/fileapi/external_mount_points_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698