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/ui/views/download/download_item_view_md.h" | 5 #include "chrome/browser/ui/views/download/download_item_view_md.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 | 705 |
706 UpdateAccessibleName(); | 706 UpdateAccessibleName(); |
707 | 707 |
708 // Calling download()->OpenDownload may delete this, so this must be | 708 // Calling download()->OpenDownload may delete this, so this must be |
709 // the last thing we do. | 709 // the last thing we do. |
710 download()->OpenDownload(); | 710 download()->OpenDownload(); |
711 } | 711 } |
712 | 712 |
713 bool DownloadItemViewMd::SubmitDownloadToFeedbackService() { | 713 bool DownloadItemViewMd::SubmitDownloadToFeedbackService() { |
714 #if defined(FULL_SAFE_BROWSING) | 714 #if defined(FULL_SAFE_BROWSING) |
715 SafeBrowsingService* sb_service = g_browser_process->safe_browsing_service(); | 715 safe_browsing::SafeBrowsingService* sb_service = |
| 716 g_browser_process->safe_browsing_service(); |
716 if (!sb_service) | 717 if (!sb_service) |
717 return false; | 718 return false; |
718 safe_browsing::DownloadProtectionService* download_protection_service = | 719 safe_browsing::DownloadProtectionService* download_protection_service = |
719 sb_service->download_protection_service(); | 720 sb_service->download_protection_service(); |
720 if (!download_protection_service) | 721 if (!download_protection_service) |
721 return false; | 722 return false; |
722 download_protection_service->feedback_service()->BeginFeedbackForDownload( | 723 download_protection_service->feedback_service()->BeginFeedbackForDownload( |
723 download()); | 724 download()); |
724 // WARNING: we are deleted at this point. Don't access 'this'. | 725 // WARNING: we are deleted at this point. Don't access 'this'. |
725 return true; | 726 return true; |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 } | 1072 } |
1072 } | 1073 } |
1073 | 1074 |
1074 SkColor DownloadItemViewMd::GetTextColor() { | 1075 SkColor DownloadItemViewMd::GetTextColor() { |
1075 return GetTextColorForThemeProvider(GetThemeProvider()); | 1076 return GetTextColorForThemeProvider(GetThemeProvider()); |
1076 } | 1077 } |
1077 | 1078 |
1078 SkColor DownloadItemViewMd::GetDimmedTextColor() { | 1079 SkColor DownloadItemViewMd::GetDimmedTextColor() { |
1079 return SkColorSetA(GetTextColor(), 0xC7); | 1080 return SkColorSetA(GetTextColor(), 0xC7); |
1080 } | 1081 } |
OLD | NEW |