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

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

Issue 10543037: gdata: Convert public synchronous functions in GDataFileSystem to asynchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Toni's comments @ 06/08/12 10:59AM PDT. Created 8 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/extensions/file_handler_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_EXTENSIONS_FILE_HANDLER_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_HANDLER_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_HANDLER_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_HANDLER_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void RequestFileEntryOnFileThread( 102 void RequestFileEntryOnFileThread(
103 const GURL& handler_base_url, 103 const GURL& handler_base_url,
104 const scoped_refptr<const extensions::Extension>& handler, 104 const scoped_refptr<const extensions::Extension>& handler,
105 int handler_pid, 105 int handler_pid,
106 const std::vector<GURL>& file_urls); 106 const std::vector<GURL>& file_urls);
107 107
108 void ExecuteFailedOnUIThread(); 108 void ExecuteFailedOnUIThread();
109 void ExecuteFileActionsOnUIThread(const std::string& file_system_name, 109 void ExecuteFileActionsOnUIThread(const std::string& file_system_name,
110 const GURL& file_system_root, 110 const GURL& file_system_root,
111 const FileDefinitionList& file_list, 111 const FileDefinitionList& file_list,
112 int handler_id); 112 int handler_pid);
113 void SetupPermissionsAndDispatchEvent(const std::string& file_system_name, 113 void SetupPermissionsAndDispatchEvent(const std::string& file_system_name,
114 const GURL& file_system_root, 114 const GURL& file_system_root,
115 const FileDefinitionList& file_list, 115 const FileDefinitionList& file_list,
116 int handler_pid_in, 116 int handler_pid_in,
117 ExtensionHost* host); 117 ExtensionHost* host);
118 118
119 // Populates |handler_host_permissions| with file path-permissions pairs that 119 // Populates |handler_host_permissions| with file path-permissions pairs that
120 // will be given to the handler extension host process. 120 // will be given to the handler extension host process.
121 void InitHandlerHostFileAccessPermissions( 121 void InitHandlerHostFileAccessPermissions(
122 const FileDefinitionList& file_list, 122 const FileDefinitionList& file_list,
123 const extensions::Extension* handler_extension, 123 const extensions::Extension* handler_extension,
124 const std::string& action_id); 124 const std::string& action_id,
125 const base::Closure& callback);
126
127 // Invoked upon completion of InitHandlerHostFileAccessPermissions initiated
128 // by ExecuteFileActionsOnUIThread.
129 void OnInitAccessForExecuteFileActionsOnUIThread(
130 const std::string& file_system_name,
131 const GURL& file_system_root,
132 const FileDefinitionList& file_list,
133 int handler_pid);
134
125 // Registers file permissions from |handler_host_permissions_| with 135 // Registers file permissions from |handler_host_permissions_| with
126 // ChildProcessSecurityPolicy for process with id |handler_pid|. 136 // ChildProcessSecurityPolicy for process with id |handler_pid|.
127 void SetupHandlerHostFileAccessPermissions(int handler_pid); 137 void SetupHandlerHostFileAccessPermissions(int handler_pid);
128 138
139 // Helper function to get the extension pointer.
140 const extensions::Extension* GetExtension();
141
129 Profile* profile_; 142 Profile* profile_;
130 const GURL source_url_; 143 const GURL source_url_;
131 const std::string extension_id_; 144 const std::string extension_id_;
132 const std::string action_id_; 145 const std::string action_id_;
133 146
134 // (File path, permission for file path) pairs for the handler. 147 // (File path, permission for file path) pairs for the handler.
135 std::vector<std::pair<FilePath, int> > handler_host_permissions_; 148 std::vector<std::pair<FilePath, int> > handler_host_permissions_;
136 }; 149 };
137 150
138 } // namespace file_handler_util 151 } // namespace file_handler_util
139 152
140 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_HANDLER_UTIL_H_ 153 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_HANDLER_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_handler_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698