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

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

Issue 7067020: Moving mediaplayer to the chrome filebrowser. Observable behaviour should not change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolved conflicts. Created 9 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) 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 std::vector<FilePath> CrosMountPointProvider::GetRootDirectories() const { 166 std::vector<FilePath> CrosMountPointProvider::GetRootDirectories() const {
167 std::vector<FilePath> root_dirs; 167 std::vector<FilePath> root_dirs;
168 for (MountPointMap::const_iterator iter = mount_point_map_.begin(); 168 for (MountPointMap::const_iterator iter = mount_point_map_.begin();
169 iter != mount_point_map_.end(); 169 iter != mount_point_map_.end();
170 ++iter) { 170 ++iter) {
171 root_dirs.push_back(iter->second.Append(iter->first)); 171 root_dirs.push_back(iter->second.Append(iter->first));
172 } 172 }
173 return root_dirs; 173 return root_dirs;
174 } 174 }
175 175
176 bool CrosMountPointProvider::GetVirtualPath(const FilePath& filesystem_path,
177 FilePath* virtual_path) {
178 for (MountPointMap::const_iterator iter = mount_point_map_.begin();
179 iter != mount_point_map_.end();
180 ++iter) {
181 FilePath mount_prefix = iter->second.Append(iter->first);
182 *virtual_path = FilePath(iter->first);
183 if (mount_prefix.AppendRelativePath(filesystem_path, virtual_path)) {
184 return true;
185 }
186 }
187 return false;
188 }
189
176 } // namespace chromeos 190 } // namespace chromeos
177 191
OLDNEW
« no previous file with comments | « webkit/chromeos/fileapi/cros_mount_point_provider.h ('k') | webkit/fileapi/file_system_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698