| OLD | NEW |
| 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_manager/private_api_file_syste
m.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_file_syste
m.h" |
| 6 | 6 |
| 7 #include <sys/statvfs.h> | 7 #include <sys/statvfs.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 base::Bind(&FileStreamMd5Digester::GetMd5Digest, | 879 base::Bind(&FileStreamMd5Digester::GetMd5Digest, |
| 880 base::Unretained(digester_.get()), | 880 base::Unretained(digester_.get()), |
| 881 base::Passed(&reader), result_callback)); | 881 base::Passed(&reader), result_callback)); |
| 882 | 882 |
| 883 return true; | 883 return true; |
| 884 } | 884 } |
| 885 | 885 |
| 886 void FileManagerPrivateInternalComputeChecksumFunction::Respond( | 886 void FileManagerPrivateInternalComputeChecksumFunction::Respond( |
| 887 const std::string& hash) { | 887 const std::string& hash) { |
| 888 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 888 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 889 SetResult(base::MakeUnique<base::StringValue>(hash)); | 889 SetResult(base::MakeUnique<base::Value>(hash)); |
| 890 SendResponse(true); | 890 SendResponse(true); |
| 891 } | 891 } |
| 892 | 892 |
| 893 bool FileManagerPrivateSearchFilesByHashesFunction::RunAsync() { | 893 bool FileManagerPrivateSearchFilesByHashesFunction::RunAsync() { |
| 894 using api::file_manager_private::SearchFilesByHashes::Params; | 894 using api::file_manager_private::SearchFilesByHashes::Params; |
| 895 const std::unique_ptr<Params> params(Params::Create(*args_)); | 895 const std::unique_ptr<Params> params(Params::Create(*args_)); |
| 896 EXTENSION_FUNCTION_VALIDATE(params); | 896 EXTENSION_FUNCTION_VALIDATE(params); |
| 897 | 897 |
| 898 // TODO(hirono): Check the volume ID and fail the function for volumes other | 898 // TODO(hirono): Check the volume ID and fail the function for volumes other |
| 899 // than Drive. | 899 // than Drive. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 return true; | 1049 return true; |
| 1050 } | 1050 } |
| 1051 | 1051 |
| 1052 void FileManagerPrivateInternalGetDirectorySizeFunction:: | 1052 void FileManagerPrivateInternalGetDirectorySizeFunction:: |
| 1053 OnDirectorySizeRetrieved(int64_t size) { | 1053 OnDirectorySizeRetrieved(int64_t size) { |
| 1054 SetResult(base::MakeUnique<base::Value>(static_cast<double>(size))); | 1054 SetResult(base::MakeUnique<base::Value>(static_cast<double>(size))); |
| 1055 SendResponse(true); | 1055 SendResponse(true); |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 } // namespace extensions | 1058 } // namespace extensions |
| OLD | NEW |