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

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

Issue 304373004: Implement IsNonNativeLocalPathDirectory for supporting non-local non-Drive directory access in apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comment. Created 6 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 | « no previous file | chrome/browser/chromeos/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_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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 // Invokes |callback| on blocking thread pool, after converting virtual |path| 138 // Invokes |callback| on blocking thread pool, after converting virtual |path|
139 // string like "/special/drive/foo.txt" to the concrete local cache file path. 139 // string like "/special/drive/foo.txt" to the concrete local cache file path.
140 // After |callback| returns, the written content is synchronized to the server. 140 // After |callback| returns, the written content is synchronized to the server.
141 // 141 //
142 // The |path| must be a path under Drive. Must be called from UI thread. 142 // The |path| must be a path under Drive. Must be called from UI thread.
143 void PrepareWritableFileAndRun(Profile* profile, 143 void PrepareWritableFileAndRun(Profile* profile,
144 const base::FilePath& path, 144 const base::FilePath& path,
145 const PrepareWritableFileCallback& callback); 145 const PrepareWritableFileCallback& callback);
146 146
147 // Checks whether a directory exists at the given Drive path |directory|.
148 // Must be called from UI thread. The result will be called back to |callback|.
149 void CheckDirectoryExists(Profile* profile,
150 const base::FilePath& directory,
151 const FileOperationCallback& callback);
152
153 // Ensures the existence of |directory| of '/special/drive/foo'. This will 147 // Ensures the existence of |directory| of '/special/drive/foo'. This will
154 // create |directory| and its ancestors if they don't exist. |callback| is 148 // create |directory| and its ancestors if they don't exist. |callback| is
155 // invoked after making sure that |directory| exists. |callback| should 149 // invoked after making sure that |directory| exists. |callback| should
156 // interpret error codes of either FILE_ERROR_OK or FILE_ERROR_EXISTS as 150 // interpret error codes of either FILE_ERROR_OK or FILE_ERROR_EXISTS as
157 // indicating that |directory| now exists. 151 // indicating that |directory| now exists.
158 // 152 //
159 // If |directory| is not a Drive path, it won't check the existence and just 153 // If |directory| is not a Drive path, it won't check the existence and just
160 // runs |callback|. 154 // runs |callback|.
161 // 155 //
162 // Must be called from UI thread. 156 // Must be called from UI thread.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 DRIVE_CONNECTED, 207 DRIVE_CONNECTED,
214 }; 208 };
215 209
216 // Returns the Drive connection status for the |profile|. 210 // Returns the Drive connection status for the |profile|.
217 ConnectionStatusType GetDriveConnectionStatus(Profile* profile); 211 ConnectionStatusType GetDriveConnectionStatus(Profile* profile);
218 212
219 } // namespace util 213 } // namespace util
220 } // namespace drive 214 } // namespace drive
221 215
222 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ 216 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698