| OLD | NEW |
| 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_manager/filesystem_api_util.h" | 5 #include "chrome/browser/chromeos/file_manager/filesystem_api_util.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "chrome/browser/chromeos/drive/file_errors.h" | 11 #include "chrome/browser/chromeos/drive/file_errors.h" |
| 12 #include "chrome/browser/chromeos/drive/file_system_interface.h" | 12 #include "chrome/browser/chromeos/drive/file_system_interface.h" |
| 13 #include "chrome/browser/chromeos/drive/file_system_util.h" | 13 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| 14 #include "chrome/browser/chromeos/file_manager/app_id.h" | 14 #include "chrome/browser/chromeos/file_manager/app_id.h" |
| 15 #include "chrome/browser/chromeos/file_manager/fileapi_util.h" | 15 #include "chrome/browser/chromeos/file_manager/fileapi_util.h" |
| 16 #include "chrome/browser/chromeos/file_system_provider/mount_path_util.h" | 16 #include "chrome/browser/chromeos/file_system_provider/mount_path_util.h" |
| 17 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte
rface.h" | 17 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte
rface.h" |
| 18 #include "chrome/browser/extensions/extension_util.h" | 18 #include "chrome/browser/extensions/extension_util.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
| 21 #include "content/public/browser/storage_partition.h" | 21 #include "content/public/browser/storage_partition.h" |
| 22 #include "google_apis/drive/task_util.h" | 22 #include "google_apis/drive/task_util.h" |
| 23 #include "storage/browser/fileapi/file_system_context.h" | 23 #include "storage/browser/fileapi/file_system_context.h" |
| 24 | 24 |
| 25 namespace file_manager { | 25 namespace file_manager { |
| 26 namespace util { | 26 namespace util { |
| 27 | |
| 28 namespace { | 27 namespace { |
| 29 | 28 |
| 30 // Helper function used to implement GetNonNativeLocalPathMimeType. It extracts | 29 // Helper function used to implement GetNonNativeLocalPathMimeType. It extracts |
| 31 // the mime type from the passed Drive resource entry. | 30 // the mime type from the passed Drive resource entry. |
| 32 void GetMimeTypeAfterGetResourceEntryForDrive( | 31 void GetMimeTypeAfterGetResourceEntryForDrive( |
| 33 const base::Callback<void(bool, const std::string&)>& callback, | 32 const base::Callback<void(bool, const std::string&)>& callback, |
| 34 drive::FileError error, | 33 drive::FileError error, |
| 35 scoped_ptr<drive::ResourceEntry> entry) { | 34 scoped_ptr<drive::ResourceEntry> entry) { |
| 36 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 35 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 37 | 36 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 content::BrowserThread::IO, | 240 content::BrowserThread::IO, |
| 242 FROM_HERE, | 241 FROM_HERE, |
| 243 base::Bind(&PrepareFileOnIOThread, | 242 base::Bind(&PrepareFileOnIOThread, |
| 244 make_scoped_refptr(context), | 243 make_scoped_refptr(context), |
| 245 context->CrackURL(url), | 244 context->CrackURL(url), |
| 246 google_apis::CreateRelayCallback(callback))); | 245 google_apis::CreateRelayCallback(callback))); |
| 247 } | 246 } |
| 248 | 247 |
| 249 } // namespace util | 248 } // namespace util |
| 250 } // namespace file_manager | 249 } // namespace file_manager |
| OLD | NEW |