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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc

Issue 335753004: [fsp] Cleanup handling errors for operation requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 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
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 "chrome/browser/chromeos/file_system_provider/operations/get_metadata.h " 5 #include "chrome/browser/chromeos/file_system_provider/operations/get_metadata.h "
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/common/extensions/api/file_system_provider.h" 9 #include "chrome/common/extensions/api/file_system_provider.h"
10 #include "chrome/common/extensions/api/file_system_provider_internal.h" 10 #include "chrome/common/extensions/api/file_system_provider_internal.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void GetMetadata::OnSuccess(int /* request_id */, 70 void GetMetadata::OnSuccess(int /* request_id */,
71 scoped_ptr<RequestValue> result, 71 scoped_ptr<RequestValue> result,
72 bool has_more) { 72 bool has_more) {
73 base::File::Info file_info; 73 base::File::Info file_info;
74 const bool convert_result = 74 const bool convert_result =
75 ConvertRequestValueToFileInfo(result.Pass(), &file_info); 75 ConvertRequestValueToFileInfo(result.Pass(), &file_info);
76 DCHECK(convert_result); 76 DCHECK(convert_result);
77 callback_.Run(base::File::FILE_OK, file_info); 77 callback_.Run(base::File::FILE_OK, file_info);
78 } 78 }
79 79
80 void GetMetadata::OnError(int /* request_id */, base::File::Error error) { 80 void GetMetadata::OnError(int /* request_id */,
81 scoped_ptr<RequestValue> /* result */,
82 base::File::Error error) {
81 callback_.Run(error, base::File::Info()); 83 callback_.Run(error, base::File::Info());
82 } 84 }
83 85
84 } // namespace operations 86 } // namespace operations
85 } // namespace file_system_provider 87 } // namespace file_system_provider
86 } // namespace chromeos 88 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698