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

Side by Side Diff: chrome/browser/extensions/api/file_system/file_system_api.h

Issue 656733002: Fix filesystem.retainEntry API to handle non-native directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 protected: 179 protected:
180 virtual ~FileSystemRetainEntryFunction() {} 180 virtual ~FileSystemRetainEntryFunction() {}
181 virtual bool RunAsync() override; 181 virtual bool RunAsync() override;
182 182
183 private: 183 private:
184 // Retains the file entry referenced by |entry_id| in apps::SavedFilesService. 184 // Retains the file entry referenced by |entry_id| in apps::SavedFilesService.
185 // |entry_id| must refer to an entry in an isolated file system. 185 // |entry_id| must refer to an entry in an isolated file system.
186 void RetainFileEntry(const std::string& entry_id); 186 void RetainFileEntry(const std::string& entry_id);
187 187
188 void SetIsDirectoryOnFileThread(); 188 void SetIsDirectoryOnIOThread(const std::string& entry_id,
mtomasz 2014/10/14 06:08:50 nit: Please add a comment.
hirono 2014/10/14 09:22:10 I removed the method.
189 base::File::Error result,
190 const base::File::Info& file_info);
189 191
190 // Whether the file being retained is a directory. 192 // Whether the file being retained is a directory.
191 bool is_directory_; 193 bool is_directory_;
192 194
193 // The path to the file to retain. 195 // The path to the file to retain.
194 base::FilePath path_; 196 base::FilePath path_;
195 }; 197 };
196 198
197 class FileSystemIsRestorableFunction : public ChromeSyncExtensionFunction { 199 class FileSystemIsRestorableFunction : public ChromeSyncExtensionFunction {
198 public: 200 public:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 FILESYSTEM_GETOBSERVEDENTRIES); 241 FILESYSTEM_GETOBSERVEDENTRIES);
240 242
241 protected: 243 protected:
242 virtual ~FileSystemGetObservedEntriesFunction() {} 244 virtual ~FileSystemGetObservedEntriesFunction() {}
243 virtual bool RunSync() override; 245 virtual bool RunSync() override;
244 }; 246 };
245 247
246 } // namespace extensions 248 } // namespace extensions
247 249
248 #endif // CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ 250 #endif // CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698