| 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/chromeos/drive/download_handler.h" | 5 #include "chrome/browser/chromeos/drive/download_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/supports_user_data.h" | 9 #include "base/supports_user_data.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
| 11 #include "chrome/browser/chromeos/drive/drive.pb.h" | |
| 12 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 11 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
| 13 #include "chrome/browser/chromeos/drive/file_system_interface.h" | 12 #include "chrome/browser/chromeos/drive/file_system_interface.h" |
| 14 #include "chrome/browser/chromeos/drive/file_system_util.h" | 13 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| 15 #include "chrome/browser/chromeos/drive/write_on_cache_file.h" | 14 #include "chrome/browser/chromeos/drive/write_on_cache_file.h" |
| 16 #include "chrome/browser/download/download_history.h" | 15 #include "chrome/browser/download/download_history.h" |
| 17 #include "chrome/browser/download/download_service.h" | 16 #include "chrome/browser/download/download_service.h" |
| 18 #include "chrome/browser/download/download_service_factory.h" | 17 #include "chrome/browser/download/download_service_factory.h" |
| 18 #include "components/drive/drive.pb.h" |
| 19 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
| 20 | 20 |
| 21 using content::BrowserThread; | 21 using content::BrowserThread; |
| 22 using content::DownloadManager; | 22 using content::DownloadManager; |
| 23 using content::DownloadItem; | 23 using content::DownloadItem; |
| 24 | 24 |
| 25 namespace drive { | 25 namespace drive { |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 // Key for base::SupportsUserData::Data. | 28 // Key for base::SupportsUserData::Data. |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 333 |
| 334 DownloadManager* DownloadHandler::GetDownloadManager(void* manager_id) { | 334 DownloadManager* DownloadHandler::GetDownloadManager(void* manager_id) { |
| 335 if (manager_id == notifier_->GetManager()) | 335 if (manager_id == notifier_->GetManager()) |
| 336 return notifier_->GetManager(); | 336 return notifier_->GetManager(); |
| 337 if (notifier_incognito_ && manager_id == notifier_incognito_->GetManager()) | 337 if (notifier_incognito_ && manager_id == notifier_incognito_->GetManager()) |
| 338 return notifier_incognito_->GetManager(); | 338 return notifier_incognito_->GetManager(); |
| 339 return NULL; | 339 return NULL; |
| 340 } | 340 } |
| 341 | 341 |
| 342 } // namespace drive | 342 } // namespace drive |
| OLD | NEW |