OLD | NEW |
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 #include "chrome/browser/extensions/api/file_system/file_system_api.h" | 5 #include "chrome/browser/extensions/api/file_system/file_system_api.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 base::FilePath file_path; | 483 base::FilePath file_path; |
484 std::string error; | 484 std::string error; |
485 if (!app_file_handler_util::ValidateFileEntryAndGetPath( | 485 if (!app_file_handler_util::ValidateFileEntryAndGetPath( |
486 filesystem_name, filesystem_path, | 486 filesystem_name, filesystem_path, |
487 render_frame_host()->GetProcess()->GetID(), &file_path, &error)) { | 487 render_frame_host()->GetProcess()->GetID(), &file_path, &error)) { |
488 return RespondNow(Error(error)); | 488 return RespondNow(Error(error)); |
489 } | 489 } |
490 | 490 |
491 file_path = path_util::PrettifyPath(file_path); | 491 file_path = path_util::PrettifyPath(file_path); |
492 return RespondNow( | 492 return RespondNow( |
493 OneArgument(base::MakeUnique<base::StringValue>(file_path.value()))); | 493 OneArgument(base::MakeUnique<base::Value>(file_path.value()))); |
494 } | 494 } |
495 | 495 |
496 FileSystemEntryFunction::FileSystemEntryFunction() | 496 FileSystemEntryFunction::FileSystemEntryFunction() |
497 : multiple_(false), is_directory_(false) {} | 497 : multiple_(false), is_directory_(false) {} |
498 | 498 |
499 void FileSystemEntryFunction::PrepareFilesForWritableApp( | 499 void FileSystemEntryFunction::PrepareFilesForWritableApp( |
500 const std::vector<base::FilePath>& paths) { | 500 const std::vector<base::FilePath>& paths) { |
501 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 501 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
502 // TODO(cmihail): Path directory set should be initialized only with the | 502 // TODO(cmihail): Path directory set should be initialized only with the |
503 // paths that are actually directories, but for now we will consider | 503 // paths that are actually directories, but for now we will consider |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1435 return RespondNow(Error(kNotSupportedOnNonKioskSessionError)); | 1435 return RespondNow(Error(kNotSupportedOnNonKioskSessionError)); |
1436 std::vector<api::file_system::Volume> result_volume_list; | 1436 std::vector<api::file_system::Volume> result_volume_list; |
1437 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); | 1437 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); |
1438 | 1438 |
1439 return RespondNow(ArgumentList( | 1439 return RespondNow(ArgumentList( |
1440 api::file_system::GetVolumeList::Results::Create(result_volume_list))); | 1440 api::file_system::GetVolumeList::Results::Create(result_volume_list))); |
1441 } | 1441 } |
1442 #endif | 1442 #endif |
1443 | 1443 |
1444 } // namespace extensions | 1444 } // namespace extensions |
OLD | NEW |