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

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

Issue 15878006: drive: Stop mentioning about symlinks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_interface.h ('k') | no next file » | 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_FILE_SYSTEM_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 // Escapes forward slashes from file names with magic unicode character 140 // Escapes forward slashes from file names with magic unicode character
141 // \u2215 pretty much looks the same in UI. 141 // \u2215 pretty much looks the same in UI.
142 std::string EscapeUtf8FileName(const std::string& input); 142 std::string EscapeUtf8FileName(const std::string& input);
143 143
144 // Gets the cache root path (i.e. <user_profile_dir>/GCache/v1) from the 144 // Gets the cache root path (i.e. <user_profile_dir>/GCache/v1) from the
145 // profile. 145 // profile.
146 base::FilePath GetCacheRootPath(Profile* profile); 146 base::FilePath GetCacheRootPath(Profile* profile);
147 147
148 // Extracts resource_id, md5, and extra_extension from cache path. 148 // Extracts resource_id, md5, and extra_extension from cache path.
149 // Case 1: Pinned and outgoing symlinks only have resource_id. 149 // Case 1: Normal files have both resource_id and md5.
150 // Example: path="/user/GCache/v1/pinned/pdf:a1b2" =>
151 // resource_id="pdf:a1b2", md5="", extra_extension="";
152 // Case 2: Normal files have both resource_id and md5.
153 // Example: path="/user/GCache/v1/tmp/pdf:a1b2.01234567" => 150 // Example: path="/user/GCache/v1/tmp/pdf:a1b2.01234567" =>
154 // resource_id="pdf:a1b2", md5="01234567", extra_extension=""; 151 // resource_id="pdf:a1b2", md5="01234567", extra_extension="";
155 // Case 3: Mounted files have all three parts. 152 // Case 2: Mounted files have all three parts.
156 // Example: path="/user/GCache/v1/persistent/pdf:a1b2.01234567.mounted" => 153 // Example: path="/user/GCache/v1/persistent/pdf:a1b2.01234567.mounted" =>
157 // resource_id="pdf:a1b2", md5="01234567", extra_extension="mounted". 154 // resource_id="pdf:a1b2", md5="01234567", extra_extension="mounted".
158 void ParseCacheFilePath(const base::FilePath& path, 155 void ParseCacheFilePath(const base::FilePath& path,
159 std::string* resource_id, 156 std::string* resource_id,
160 std::string* md5, 157 std::string* md5,
161 std::string* extra_extension); 158 std::string* extra_extension);
162 159
163 // Callback type for PrepareWritableFileAndRun. 160 // Callback type for PrepareWritableFileAndRun.
164 typedef base::Callback<void (FileError, const base::FilePath& path)> 161 typedef base::Callback<void (FileError, const base::FilePath& path)>
165 OpenFileCallback; 162 OpenFileCallback;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // Reads URL from a GDoc file. 227 // Reads URL from a GDoc file.
231 GURL ReadUrlFromGDocFile(const base::FilePath& file_path); 228 GURL ReadUrlFromGDocFile(const base::FilePath& file_path);
232 229
233 // Reads resource ID from a GDoc file. 230 // Reads resource ID from a GDoc file.
234 std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path); 231 std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path);
235 232
236 } // namespace util 233 } // namespace util
237 } // namespace drive 234 } // namespace drive
238 235
239 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ 236 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_interface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698