Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: chrome/browser/ui/views/download/download_item_view.cc

Issue 1420053005: Move code in components/safe_browsing_db and chrome/browser/s_b/ under the safe_browsing namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_components_move
Patch Set: Remove '// namespace safe_browsing' for a small fwd decl block. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.h" 5 #include "chrome/browser/ui/views/download/download_item_view.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 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 938
939 UpdateAccessibleName(); 939 UpdateAccessibleName();
940 940
941 // Calling download()->OpenDownload may delete this, so this must be 941 // Calling download()->OpenDownload may delete this, so this must be
942 // the last thing we do. 942 // the last thing we do.
943 download()->OpenDownload(); 943 download()->OpenDownload();
944 } 944 }
945 945
946 bool DownloadItemView::SubmitDownloadToFeedbackService() { 946 bool DownloadItemView::SubmitDownloadToFeedbackService() {
947 #if defined(FULL_SAFE_BROWSING) 947 #if defined(FULL_SAFE_BROWSING)
948 SafeBrowsingService* sb_service = g_browser_process->safe_browsing_service(); 948 safe_browsing::SafeBrowsingService* sb_service =
949 g_browser_process->safe_browsing_service();
949 if (!sb_service) 950 if (!sb_service)
950 return false; 951 return false;
951 safe_browsing::DownloadProtectionService* download_protection_service = 952 safe_browsing::DownloadProtectionService* download_protection_service =
952 sb_service->download_protection_service(); 953 sb_service->download_protection_service();
953 if (!download_protection_service) 954 if (!download_protection_service)
954 return false; 955 return false;
955 download_protection_service->feedback_service()->BeginFeedbackForDownload( 956 download_protection_service->feedback_service()->BeginFeedbackForDownload(
956 download()); 957 download());
957 // WARNING: we are deleted at this point. Don't access 'this'. 958 // WARNING: we are deleted at this point. Don't access 'this'.
958 return true; 959 return true;
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 void DownloadItemView::AnimateStateTransition(State from, State to, 1389 void DownloadItemView::AnimateStateTransition(State from, State to,
1389 gfx::SlideAnimation* animation) { 1390 gfx::SlideAnimation* animation) {
1390 if (from == NORMAL && to == HOT) { 1391 if (from == NORMAL && to == HOT) {
1391 animation->Show(); 1392 animation->Show();
1392 } else if (from == HOT && to == NORMAL) { 1393 } else if (from == HOT && to == NORMAL) {
1393 animation->Hide(); 1394 animation->Hide();
1394 } else if (from != to) { 1395 } else if (from != to) {
1395 animation->Reset((to == HOT) ? 1.0 : 0.0); 1396 animation->Reset((to == HOT) ? 1.0 : 0.0);
1396 } 1397 }
1397 } 1398 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/certificate_reporting_test_utils.cc ('k') | chrome/browser/ui/views/download/download_item_view_md.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698