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

Side by Side Diff: webkit/chromeos/fileapi/cros_mount_point_provider.cc

Issue 7312023: Refactoring: Change all -FileUtils non-Singleton and to own underlying FileUtils. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Reflected the comments. Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/fileapi/cros_mount_point_provider.h" 5 #include "webkit/chromeos/fileapi/cros_mount_point_provider.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_callback_factory.h" 8 #include "base/memory/scoped_callback_factory.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 25 matching lines...) Expand all
36 {"/home/chronos/user/", "Downloads"}, 36 {"/home/chronos/user/", "Downloads"},
37 {"/media", "archive"}, 37 {"/media", "archive"},
38 {"/media", "removable"}, 38 {"/media", "removable"},
39 }; 39 };
40 40
41 CrosMountPointProvider::CrosMountPointProvider( 41 CrosMountPointProvider::CrosMountPointProvider(
42 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) 42 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy)
43 : special_storage_policy_(special_storage_policy), 43 : special_storage_policy_(special_storage_policy),
44 file_access_permissions_(new FileAccessPermissions()), 44 file_access_permissions_(new FileAccessPermissions()),
45 local_file_util_(new fileapi::LocalFileSystemFileUtil( 45 local_file_util_(new fileapi::LocalFileSystemFileUtil(
46 fileapi::FileSystemFileUtil::GetInstance())) { 46 new fileapi::FileSystemFileUtil())) {
47 for (size_t i = 0; i < arraysize(fixed_exposed_paths); i++) { 47 for (size_t i = 0; i < arraysize(fixed_exposed_paths); i++) {
48 mount_point_map_.insert(std::pair<std::string, FilePath>( 48 mount_point_map_.insert(std::pair<std::string, FilePath>(
49 std::string(fixed_exposed_paths[i].web_root_path), 49 std::string(fixed_exposed_paths[i].web_root_path),
50 FilePath(std::string(fixed_exposed_paths[i].local_root_path)))); 50 FilePath(std::string(fixed_exposed_paths[i].local_root_path))));
51 } 51 }
52 } 52 }
53 53
54 CrosMountPointProvider::~CrosMountPointProvider() { 54 CrosMountPointProvider::~CrosMountPointProvider() {
55 } 55 }
56 56
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 FilePath mount_prefix = iter->second.Append(iter->first); 190 FilePath mount_prefix = iter->second.Append(iter->first);
191 *virtual_path = FilePath(iter->first); 191 *virtual_path = FilePath(iter->first);
192 if (mount_prefix.AppendRelativePath(filesystem_path, virtual_path)) { 192 if (mount_prefix.AppendRelativePath(filesystem_path, virtual_path)) {
193 return true; 193 return true;
194 } 194 }
195 } 195 }
196 return false; 196 return false;
197 } 197 }
198 198
199 } // namespace chromeos 199 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_file_browser_private_api.cc ('k') | webkit/fileapi/file_system_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698