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

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

Issue 339073003: Privacy policy links for extended safe browsing reporting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bugfix Created 6 years, 6 months 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 | Annotate | Revision Log
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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 } 554 }
555 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", warning_duration); 555 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", warning_duration);
556 if (model_.ShouldAllowDownloadFeedback() && 556 if (model_.ShouldAllowDownloadFeedback() &&
557 !shelf_->browser()->profile()->IsOffTheRecord()) { 557 !shelf_->browser()->profile()->IsOffTheRecord()) {
558 if (!shelf_->browser()->profile()->GetPrefs()->HasPrefPath( 558 if (!shelf_->browser()->profile()->GetPrefs()->HasPrefPath(
559 prefs::kSafeBrowsingExtendedReportingEnabled)) { 559 prefs::kSafeBrowsingExtendedReportingEnabled)) {
560 // Show dialog, because the dialog hasn't been shown before. 560 // Show dialog, because the dialog hasn't been shown before.
561 DownloadFeedbackDialogView::Show( 561 DownloadFeedbackDialogView::Show(
562 shelf_->get_parent()->GetNativeWindow(), 562 shelf_->get_parent()->GetNativeWindow(),
563 shelf_->browser()->profile(), 563 shelf_->browser()->profile(),
564 shelf_->GetNavigator(),
564 base::Bind( 565 base::Bind(
565 &DownloadItemView::PossiblySubmitDownloadToFeedbackService, 566 &DownloadItemView::PossiblySubmitDownloadToFeedbackService,
566 weak_ptr_factory_.GetWeakPtr())); 567 weak_ptr_factory_.GetWeakPtr()));
567 } else { 568 } else {
568 PossiblySubmitDownloadToFeedbackService( 569 PossiblySubmitDownloadToFeedbackService(
569 shelf_->browser()->profile()->GetPrefs()->GetBoolean( 570 shelf_->browser()->profile()->GetPrefs()->GetBoolean(
570 prefs::kSafeBrowsingExtendedReportingEnabled)); 571 prefs::kSafeBrowsingExtendedReportingEnabled));
571 } 572 }
572 return; 573 return;
573 } 574 }
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 void DownloadItemView::AnimateStateTransition(State from, State to, 1344 void DownloadItemView::AnimateStateTransition(State from, State to,
1344 gfx::SlideAnimation* animation) { 1345 gfx::SlideAnimation* animation) {
1345 if (from == NORMAL && to == HOT) { 1346 if (from == NORMAL && to == HOT) {
1346 animation->Show(); 1347 animation->Show();
1347 } else if (from == HOT && to == NORMAL) { 1348 } else if (from == HOT && to == NORMAL) {
1348 animation->Hide(); 1349 animation->Hide();
1349 } else if (from != to) { 1350 } else if (from != to) {
1350 animation->Reset((to == HOT) ? 1.0 : 0.0); 1351 animation->Reset((to == HOT) ? 1.0 : 0.0);
1351 } 1352 }
1352 } 1353 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698