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

Side by Side Diff: chrome/browser/chromeos/extensions/file_browser_handler_api.h

Issue 10600013: Wired support for file truncating with RemoteFileSystemOperation::OpenFile() method (case when base… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/extensions/file_browser_handler_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_CHROMEOS_EXTENSIONS_FILE_BROWSER_HANDLER_API_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_HANDLER_API_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_HANDLER_API_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_HANDLER_API_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 protected: 49 protected:
50 virtual ~FileHandlerSelectFileFunction() OVERRIDE; 50 virtual ~FileHandlerSelectFileFunction() OVERRIDE;
51 virtual bool RunImpl() OVERRIDE; 51 virtual bool RunImpl() OVERRIDE;
52 52
53 private: 53 private:
54 // Calls |DoCreateFile| on file thread and invokes the callback. 54 // Calls |DoCreateFile| on file thread and invokes the callback.
55 void CreateFileOnFileThread(bool success, 55 void CreateFileOnFileThread(bool success,
56 const std::string& file_system_name, 56 const std::string& file_system_name,
57 const GURL& file_system_root); 57 const GURL& file_system_root);
58 58
59 // Creates file on provided file path.
60 bool DoCreateFile();
61
62 // Called on UI thread after the file gets created. 59 // Called on UI thread after the file gets created.
63 void OnFileCreated(bool success, 60 void OnFileCreated(bool success,
64 const std::string& file_system_name, 61 const std::string& file_system_name,
65 const GURL& file_system_root); 62 const GURL& file_system_root);
66 63
67 // Grants file access permissions for the created file to the extension with 64 // Grants file access permissions for the created file to the extension with
68 // cros mount point provider and child process security policy. 65 // cros mount point provider and child process security policy.
69 // Returns virtual path for which has been given permission. 66 // Returns virtual path for which has been given permission.
70 FilePath GrantPermissions(); 67 FilePath GrantPermissions();
71 68
(...skipping 13 matching lines...) Expand all
85 // |file_selector_for_test_| and |disable_geture_check_for_test_| are used 82 // |file_selector_for_test_| and |disable_geture_check_for_test_| are used
86 // primary in testing to override file selector to be used in the function 83 // primary in testing to override file selector to be used in the function
87 // implementation and disable user gesture check. 84 // implementation and disable user gesture check.
88 // Once set they will be used for every extension function call. 85 // Once set they will be used for every extension function call.
89 static file_handler::FileSelector* file_selector_for_test_; 86 static file_handler::FileSelector* file_selector_for_test_;
90 static bool gesture_check_disabled_for_test_; 87 static bool gesture_check_disabled_for_test_;
91 }; 88 };
92 89
93 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_HANDLER_API_H_ 90 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_HANDLER_API_H_
94 91
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_handler_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698