| 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/imageburner/burn_manager.h" | 5 #include "chrome/browser/chromeos/imageburner/burn_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 WebContents* web_contents, | 418 WebContents* web_contents, |
| 419 net::FileStream* file_stream) { | 419 net::FileStream* file_stream) { |
| 420 if (file_stream) { | 420 if (file_stream) { |
| 421 DownloadManager* download_manager = | 421 DownloadManager* download_manager = |
| 422 web_contents->GetBrowserContext()->GetDownloadManager(); | 422 web_contents->GetBrowserContext()->GetDownloadManager(); |
| 423 DownloadSaveInfo save_info; | 423 DownloadSaveInfo save_info; |
| 424 save_info.file_path = file_path; | 424 save_info.file_path = file_path; |
| 425 save_info.file_stream = linked_ptr<net::FileStream>(file_stream); | 425 save_info.file_stream = linked_ptr<net::FileStream>(file_stream); |
| 426 DownloadStarted(true, url); | 426 DownloadStarted(true, url); |
| 427 | 427 |
| 428 download_util::RecordDownloadCount( | 428 download_util::RecordDownloadSource( |
| 429 download_util::INITIATED_BY_IMAGE_BURNER_COUNT); | 429 download_util::INITIATED_BY_IMAGE_BURNER); |
| 430 download_manager->DownloadUrl( | 430 download_manager->DownloadUrl( |
| 431 url, | 431 url, |
| 432 web_contents->GetURL(), | 432 web_contents->GetURL(), |
| 433 web_contents->GetEncoding(), | 433 web_contents->GetEncoding(), |
| 434 false, | 434 false, |
| 435 -1, | 435 -1, |
| 436 save_info, | 436 save_info, |
| 437 web_contents); | 437 web_contents); |
| 438 } else { | 438 } else { |
| 439 DownloadStarted(false, url); | 439 DownloadStarted(false, url); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 451 current_listener != listener_range.second; | 451 current_listener != listener_range.second; |
| 452 ++current_listener) { | 452 ++current_listener) { |
| 453 if (current_listener->second) | 453 if (current_listener->second) |
| 454 current_listener->second->OnBurnDownloadStarted(success); | 454 current_listener->second->OnBurnDownloadStarted(success); |
| 455 } | 455 } |
| 456 listeners_.erase(listener_range.first, listener_range.second); | 456 listeners_.erase(listener_range.first, listener_range.second); |
| 457 } | 457 } |
| 458 | 458 |
| 459 } // namespace imageburner | 459 } // namespace imageburner |
| 460 } // namespace chromeos | 460 } // namespace chromeos |
| OLD | NEW |