| 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/download/download_item_model.h" | 5 #include "chrome/browser/download/download_item_model.h" |
| 6 | 6 |
| 7 #include "base/i18n/number_formatting.h" | 7 #include "base/i18n/number_formatting.h" |
| 8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
| 9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // Whether the download should be opened in the browser vs. the system handler | 58 // Whether the download should be opened in the browser vs. the system handler |
| 59 // for the file type. | 59 // for the file type. |
| 60 bool should_prefer_opening_in_browser_; | 60 bool should_prefer_opening_in_browser_; |
| 61 | 61 |
| 62 // Whether the download should be considered dangerous if SafeBrowsing doesn't | 62 // Whether the download should be considered dangerous if SafeBrowsing doesn't |
| 63 // come up with a verdict. | 63 // come up with a verdict. |
| 64 bool is_dangerous_file_based_on_type_; | 64 bool is_dangerous_file_based_on_type_; |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 DownloadItemModelData(); | 67 DownloadItemModelData(); |
| 68 virtual ~DownloadItemModelData() {} | 68 ~DownloadItemModelData() override {} |
| 69 | 69 |
| 70 static const char kKey[]; | 70 static const char kKey[]; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 // static | 73 // static |
| 74 const char DownloadItemModelData::kKey[] = "DownloadItemModelData key"; | 74 const char DownloadItemModelData::kKey[] = "DownloadItemModelData key"; |
| 75 | 75 |
| 76 // static | 76 // static |
| 77 const DownloadItemModelData* DownloadItemModelData::Get( | 77 const DownloadItemModelData* DownloadItemModelData::Get( |
| 78 const DownloadItem* download) { | 78 const DownloadItem* download) { |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 if (!download_service) | 693 if (!download_service) |
| 694 return; | 694 return; |
| 695 | 695 |
| 696 ChromeDownloadManagerDelegate* delegate = | 696 ChromeDownloadManagerDelegate* delegate = |
| 697 download_service->GetDownloadManagerDelegate(); | 697 download_service->GetDownloadManagerDelegate(); |
| 698 if (!delegate) | 698 if (!delegate) |
| 699 return; | 699 return; |
| 700 delegate->OpenDownloadUsingPlatformHandler(download_); | 700 delegate->OpenDownloadUsingPlatformHandler(download_); |
| 701 RecordDownloadOpenMethod(DOWNLOAD_OPEN_METHOD_USER_PLATFORM); | 701 RecordDownloadOpenMethod(DOWNLOAD_OPEN_METHOD_USER_PLATFORM); |
| 702 } | 702 } |
| OLD | NEW |