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

Side by Side Diff: chrome/browser/chromeos/drive/drive_file_system_util.h

Issue 13401003: chromeos: Replace resource ID in drive URL with path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unneeded include Created 7 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_file_system_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Checks if the resource ID is a special one, which is effective only in our 82 // Checks if the resource ID is a special one, which is effective only in our
83 // implementation and is not supposed to be sent to the server. 83 // implementation and is not supposed to be sent to the server.
84 bool IsSpecialResourceId(const std::string& resource_id); 84 bool IsSpecialResourceId(const std::string& resource_id);
85 85
86 // Returns the Drive mount path as string. 86 // Returns the Drive mount path as string.
87 const std::string& GetDriveMountPointPathAsString(); 87 const std::string& GetDriveMountPointPathAsString();
88 88
89 // Returns the 'local' root of remote file system as "/special". 89 // Returns the 'local' root of remote file system as "/special".
90 const base::FilePath& GetSpecialRemoteRootPath(); 90 const base::FilePath& GetSpecialRemoteRootPath();
91 91
92 // Returns the gdata file resource url formatted as 92 // Returns the gdata file resource url formatted as "drive:<path>"
93 // chrome://drive/<resource_id>/<file_name>. 93 GURL FilePathToDriveURL(const base::FilePath& path);
94 GURL GetFileResourceUrl(const std::string& resource_id, 94
95 const std::string& file_name); 95 // Converts a drive: URL back to a path that can be passed to DriveFileSystem.
96 base::FilePath DriveURLToFilePath(const GURL& url);
96 97
97 // Given a profile and a drive_cache_path, return the file resource url. 98 // Given a profile and a drive_cache_path, return the file resource url.
98 void ModifyDriveFileResourceUrl(Profile* profile, 99 void ModifyDriveFileResourceUrl(Profile* profile,
99 const base::FilePath& drive_cache_path, 100 const base::FilePath& drive_cache_path,
100 GURL* url); 101 GURL* url);
101 102
102 // Returns true if the given path is under the Drive mount point. 103 // Returns true if the given path is under the Drive mount point.
103 bool IsUnderDriveMountPoint(const base::FilePath& path); 104 bool IsUnderDriveMountPoint(const base::FilePath& path);
104 105
105 // Returns true if the given path is under the Drive mount point and needs to be 106 // Returns true if the given path is under the Drive mount point and needs to be
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 void operator()(T* object) const { 197 void operator()(T* object) const {
197 if (object) 198 if (object)
198 object->Destroy(); 199 object->Destroy();
199 } 200 }
200 }; 201 };
201 202
202 } // namespace util 203 } // namespace util
203 } // namespace drive 204 } // namespace drive
204 205
205 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_ 206 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698