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

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

Issue 279213002: [fsp] Add support for closing files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/chromeos/extensions/file_system_provider/file_system_pr ovider_api.h" 5 #include "chrome/browser/chromeos/extensions/file_system_provider/file_system_pr ovider_api.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 bool FileSystemProviderInternalOpenFileRequestedErrorFunction::RunWhenValid() { 163 bool FileSystemProviderInternalOpenFileRequestedErrorFunction::RunWhenValid() {
164 using api::file_system_provider_internal::OpenFileRequestedError::Params; 164 using api::file_system_provider_internal::OpenFileRequestedError::Params;
165 const scoped_ptr<Params> params(Params::Create(*args_)); 165 const scoped_ptr<Params> params(Params::Create(*args_));
166 EXTENSION_FUNCTION_VALIDATE(params); 166 EXTENSION_FUNCTION_VALIDATE(params);
167 167
168 RejectRequest(ProviderErrorToFileError(params->error)); 168 RejectRequest(ProviderErrorToFileError(params->error));
169 return true; 169 return true;
170 } 170 }
171 171
172 bool
173 FileSystemProviderInternalCloseFileRequestedSuccessFunction::RunWhenValid() {
174 using api::file_system_provider_internal::CloseFileRequestedSuccess::Params;
175 scoped_ptr<Params> params(Params::Create(*args_));
176 EXTENSION_FUNCTION_VALIDATE(params);
177
178 FulfillRequest(scoped_ptr<RequestValue>(new RequestValue()),
179 false /* has_more */);
180 return true;
181 }
182
183 bool FileSystemProviderInternalCloseFileRequestedErrorFunction::RunWhenValid() {
184 using api::file_system_provider_internal::CloseFileRequestedError::Params;
185 const scoped_ptr<Params> params(Params::Create(*args_));
186 EXTENSION_FUNCTION_VALIDATE(params);
187
188 RejectRequest(ProviderErrorToFileError(params->error));
189 return true;
190 }
191
172 } // namespace extensions 192 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698