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

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

Issue 1023793002: Move absolute path conversion back to the FILE thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make check_path const. Created 5 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/file_system/file_system_api.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_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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 ui::SelectFileDialog::Type picker_type); 152 ui::SelectFileDialog::Type picker_type);
153 153
154 private: 154 private:
155 void SetInitialPathOnFileThread(const base::FilePath& suggested_name, 155 void SetInitialPathOnFileThread(const base::FilePath& suggested_name,
156 const base::FilePath& previous_path); 156 const base::FilePath& previous_path);
157 157
158 // FilesSelected and FileSelectionCanceled are called by the file picker. 158 // FilesSelected and FileSelectionCanceled are called by the file picker.
159 void FilesSelected(const std::vector<base::FilePath>& path); 159 void FilesSelected(const std::vector<base::FilePath>& path);
160 void FileSelectionCanceled(); 160 void FileSelectionCanceled();
161 161
162 // Check if |check_path|, the canonicalized form of the chosen directory 162 // Check if the chosen directory is or is an ancestor of a sensitive
163 // |paths|, is or is an ancestor of a sensitive directory. If so, show a 163 // directory. If so, show a dialog to confirm that the user wants to open the
164 // dialog to confirm that the user wants to open the directory. 164 // directory. Calls OnDirectoryAccessConfirmed if the directory isn't
165 // Calls OnDirectoryAccessConfirmed if the directory isn't sensitive or the 165 // sensitive or the user chooses to open it. Otherwise, calls
166 // user chooses to open it. Otherwise, calls FileSelectionCanceled. 166 // FileSelectionCanceled.
167 void ConfirmDirectoryAccessOnFileThread( 167 void ConfirmDirectoryAccessOnFileThread(
168 const base::FilePath& check_path, 168 bool non_native_path,
169 const std::vector<base::FilePath>& paths, 169 const std::vector<base::FilePath>& paths,
170 content::WebContents* web_contents); 170 content::WebContents* web_contents);
171 void OnDirectoryAccessConfirmed(const std::vector<base::FilePath>& paths); 171 void OnDirectoryAccessConfirmed(const std::vector<base::FilePath>& paths);
172 172
173 base::FilePath initial_path_; 173 base::FilePath initial_path_;
174 }; 174 };
175 175
176 class FileSystemRetainEntryFunction : public ChromeAsyncExtensionFunction { 176 class FileSystemRetainEntryFunction : public ChromeAsyncExtensionFunction {
177 public: 177 public:
178 DECLARE_EXTENSION_FUNCTION("fileSystem.retainEntry", FILESYSTEM_RETAINENTRY) 178 DECLARE_EXTENSION_FUNCTION("fileSystem.retainEntry", FILESYSTEM_RETAINENTRY)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 FILESYSTEM_GETOBSERVEDENTRIES); 236 FILESYSTEM_GETOBSERVEDENTRIES);
237 237
238 protected: 238 protected:
239 ~FileSystemGetObservedEntriesFunction() override {} 239 ~FileSystemGetObservedEntriesFunction() override {}
240 bool RunSync() override; 240 bool RunSync() override;
241 }; 241 };
242 242
243 } // namespace extensions 243 } // namespace extensions
244 244
245 #endif // CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ 245 #endif // CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/file_system/file_system_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698