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

Side by Side Diff: chrome/browser/chromeos/extensions/file_system_provider/provider_function.cc

Issue 2360073002: [Extensions] Isolate ExtensionFunction results_ and error_ (Closed)
Patch Set: lazyboy's Created 4 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/autofill_private/autofill_private_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include <utility> 5 #include <utility>
6 6
7 #include "chrome/browser/chromeos/extensions/file_system_provider/file_system_pr ovider_api.h" 7 #include "chrome/browser/chromeos/extensions/file_system_provider/file_system_pr ovider_api.h"
8 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte rface.h" 8 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte rface.h"
9 #include "chrome/browser/chromeos/file_system_provider/request_manager.h" 9 #include "chrome/browser/chromeos/file_system_provider/request_manager.h"
10 #include "chrome/browser/chromeos/file_system_provider/request_value.h" 10 #include "chrome/browser/chromeos/file_system_provider/request_value.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 return false; 156 return false;
157 157
158 return RunWhenValid(); 158 return RunWhenValid();
159 } 159 }
160 160
161 bool FileSystemProviderInternalFunction::Parse() { 161 bool FileSystemProviderInternalFunction::Parse() {
162 std::string file_system_id; 162 std::string file_system_id;
163 163
164 if (!args_->GetString(0, &file_system_id) || 164 if (!args_->GetString(0, &file_system_id) ||
165 !args_->GetInteger(1, &request_id_)) { 165 !args_->GetInteger(1, &request_id_)) {
166 bad_message_ = true; 166 set_bad_message(true);
167 return false; 167 return false;
168 } 168 }
169 169
170 Service* service = Service::Get(GetProfile()); 170 Service* service = Service::Get(GetProfile());
171 if (!service) { 171 if (!service) {
172 return false; 172 return false;
173 } 173 }
174 174
175 ProvidedFileSystemInterface* file_system = 175 ProvidedFileSystemInterface* file_system =
176 service->GetProvidedFileSystem(extension_id(), file_system_id); 176 service->GetProvidedFileSystem(extension_id(), file_system_id);
177 if (!file_system) { 177 if (!file_system) {
178 SetError(FileErrorToString(base::File::FILE_ERROR_NOT_FOUND)); 178 SetError(FileErrorToString(base::File::FILE_ERROR_NOT_FOUND));
179 return false; 179 return false;
180 } 180 }
181 181
182 request_manager_ = file_system->GetRequestManager(); 182 request_manager_ = file_system->GetRequestManager();
183 return true; 183 return true;
184 } 184 }
185 185
186 } // namespace extensions 186 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/autofill_private/autofill_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698