| 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_util.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | |
| 9 #include <string> | 8 #include <string> |
| 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 14 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
| 15 #include "chrome/browser/chromeos/drive/file_system_util.h" | 15 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| 16 #include "chrome/browser/chromeos/file_manager/app_id.h" | 16 #include "chrome/browser/chromeos/file_manager/app_id.h" |
| 17 #include "chrome/browser/chromeos/file_manager/fileapi_util.h" | 17 #include "chrome/browser/chromeos/file_manager/fileapi_util.h" |
| 18 #include "chrome/browser/chromeos/file_manager/filesystem_api_util.h" | 18 #include "chrome/browser/chromeos/file_manager/filesystem_api_util.h" |
| 19 #include "chrome/browser/chromeos/file_manager/path_util.h" | 19 #include "chrome/browser/chromeos/file_manager/path_util.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 void ContinueGetSelectedFileInfo(Profile* profile, | 155 void ContinueGetSelectedFileInfo(Profile* profile, |
| 156 scoped_ptr<GetSelectedFileInfoParams> params, | 156 scoped_ptr<GetSelectedFileInfoParams> params, |
| 157 const base::FilePath& local_path) { | 157 const base::FilePath& local_path) { |
| 158 if (local_path.empty()) { | 158 if (local_path.empty()) { |
| 159 params->callback.Run(std::vector<ui::SelectedFileInfo>()); | 159 params->callback.Run(std::vector<ui::SelectedFileInfo>()); |
| 160 return; | 160 return; |
| 161 } | 161 } |
| 162 const int index = params->selected_files.size(); | 162 const int index = params->selected_files.size(); |
| 163 const base::FilePath& file_path = params->file_paths[index]; | 163 const base::FilePath& file_path = params->file_paths[index]; |
| 164 params->selected_files.push_back(ui::SelectedFileInfo(file_path, local_path)); | 164 params->selected_files.push_back(ui::SelectedFileInfo(file_path, local_path)); |
| 165 GetSelectedFileInfoInternal(profile, params.Pass()); | 165 GetSelectedFileInfoInternal(profile, std::move(params)); |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace | 168 } // namespace |
| 169 | 169 |
| 170 void VolumeToVolumeMetadata( | 170 void VolumeToVolumeMetadata( |
| 171 Profile* profile, | 171 Profile* profile, |
| 172 const Volume& volume, | 172 const Volume& volume, |
| 173 file_manager_private::VolumeMetadata* volume_metadata) { | 173 file_manager_private::VolumeMetadata* volume_metadata) { |
| 174 DCHECK(volume_metadata); | 174 DCHECK(volume_metadata); |
| 175 | 175 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 } | 362 } |
| 363 | 363 |
| 364 drive::EventLogger* GetLogger(Profile* profile) { | 364 drive::EventLogger* GetLogger(Profile* profile) { |
| 365 drive::DriveIntegrationService* service = | 365 drive::DriveIntegrationService* service = |
| 366 drive::DriveIntegrationServiceFactory::FindForProfile(profile); | 366 drive::DriveIntegrationServiceFactory::FindForProfile(profile); |
| 367 return service ? service->event_logger() : NULL; | 367 return service ? service->event_logger() : NULL; |
| 368 } | 368 } |
| 369 | 369 |
| 370 } // namespace util | 370 } // namespace util |
| 371 } // namespace file_manager | 371 } // namespace file_manager |
| OLD | NEW |