| 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_mount.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_mount.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 base::Bind( | 138 base::Bind( |
| 139 &FileManagerPrivateAddMountFunction::RunAfterMarkCacheFileAsMounted, | 139 &FileManagerPrivateAddMountFunction::RunAfterMarkCacheFileAsMounted, |
| 140 this, | 140 this, |
| 141 drive_path.BaseName())); | 141 drive_path.BaseName())); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void FileManagerPrivateAddMountFunction::RunAfterMarkCacheFileAsMounted( | 144 void FileManagerPrivateAddMountFunction::RunAfterMarkCacheFileAsMounted( |
| 145 const base::FilePath& display_name, | 145 const base::FilePath& display_name, |
| 146 drive::FileError error, | 146 drive::FileError error, |
| 147 const base::FilePath& file_path) { | 147 const base::FilePath& file_path) { |
| 148 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 148 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 149 | 149 |
| 150 if (error != drive::FILE_ERROR_OK) { | 150 if (error != drive::FILE_ERROR_OK) { |
| 151 SendResponse(false); | 151 SendResponse(false); |
| 152 return; | 152 return; |
| 153 } | 153 } |
| 154 | 154 |
| 155 // Pass back the actual source path of the mount point. | 155 // Pass back the actual source path of the mount point. |
| 156 SetResult(new base::StringValue(file_path.AsUTF8Unsafe())); | 156 SetResult(new base::StringValue(file_path.AsUTF8Unsafe())); |
| 157 SendResponse(true); | 157 SendResponse(true); |
| 158 | 158 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 name(), request_id(), log_string.c_str(), result.size()); | 245 name(), request_id(), log_string.c_str(), result.size()); |
| 246 } | 246 } |
| 247 | 247 |
| 248 results_ = | 248 results_ = |
| 249 file_manager_private::GetVolumeMetadataList::Results::Create(result); | 249 file_manager_private::GetVolumeMetadataList::Results::Create(result); |
| 250 SendResponse(true); | 250 SendResponse(true); |
| 251 return true; | 251 return true; |
| 252 } | 252 } |
| 253 | 253 |
| 254 } // namespace extensions | 254 } // namespace extensions |
| OLD | NEW |