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

Side by Side Diff: chrome/browser/android/download/download_controller.cc

Issue 2111983002: Record one more reason that download is canceled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/android/download/download_controller.h" 5 #include "chrome/browser/android/download/download_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/android/context_utils.h" 10 #include "base/android/context_utils.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 WebContents* web_contents, 417 WebContents* web_contents,
418 const std::string& download_guid, 418 const std::string& download_guid,
419 bool accept) { 419 bool accept) {
420 if (!web_contents) 420 if (!web_contents)
421 return; 421 return;
422 DownloadManager* dlm = 422 DownloadManager* dlm =
423 BrowserContext::GetDownloadManager(web_contents->GetBrowserContext()); 423 BrowserContext::GetDownloadManager(web_contents->GetBrowserContext());
424 DownloadItem* item = dlm->GetDownloadByGuid(download_guid); 424 DownloadItem* item = dlm->GetDownloadByGuid(download_guid);
425 if (!item) 425 if (!item)
426 return; 426 return;
427 if (accept) 427 if (accept) {
428 item->ValidateDangerousDownload(); 428 item->ValidateDangerousDownload();
429 else 429 } else {
430 DownloadController::RecordDownloadCancelReason(
431 DownloadController::CANCEL_REASON_DANGEROUS_INFOBAR_DISMISSED);
430 item->Remove(); 432 item->Remove();
433 }
431 } 434 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698