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

Side by Side Diff: chrome/browser/download/download_browsertest.cc

Issue 1100223002: Update {virtual,override} to follow C++11 style in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 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 (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 <sstream> 5 #include <sstream>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 3409 matching lines...) Expand 10 before | Expand all | Expand 10 after
3420 : public content::DownloadTestObserver { 3420 : public content::DownloadTestObserver {
3421 public: 3421 public:
3422 explicit DisableSafeBrowsingOnInProgressDownload(Browser* browser) 3422 explicit DisableSafeBrowsingOnInProgressDownload(Browser* browser)
3423 : DownloadTestObserver(DownloadManagerForBrowser(browser), 3423 : DownloadTestObserver(DownloadManagerForBrowser(browser),
3424 1, 3424 1,
3425 ON_DANGEROUS_DOWNLOAD_QUIT), 3425 ON_DANGEROUS_DOWNLOAD_QUIT),
3426 browser_(browser), 3426 browser_(browser),
3427 final_state_seen_(false) { 3427 final_state_seen_(false) {
3428 Init(); 3428 Init();
3429 } 3429 }
3430 virtual ~DisableSafeBrowsingOnInProgressDownload() {} 3430 ~DisableSafeBrowsingOnInProgressDownload() override {}
3431 3431
3432 virtual bool IsDownloadInFinalState(DownloadItem* download) override { 3432 bool IsDownloadInFinalState(DownloadItem* download) override {
3433 if (download->GetState() != DownloadItem::IN_PROGRESS || 3433 if (download->GetState() != DownloadItem::IN_PROGRESS ||
3434 download->GetTargetFilePath().empty()) 3434 download->GetTargetFilePath().empty())
3435 return false; 3435 return false;
3436 3436
3437 if (final_state_seen_) 3437 if (final_state_seen_)
3438 return true; 3438 return true;
3439 3439
3440 final_state_seen_ = true; 3440 final_state_seen_ = true;
3441 browser_->profile()->GetPrefs()->SetBoolean(prefs::kSafeBrowsingEnabled, 3441 browser_->profile()->GetPrefs()->SetBoolean(prefs::kSafeBrowsingEnabled,
3442 false); 3442 false);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
3585 *(downloads[0]))); 3585 *(downloads[0])));
3586 3586
3587 // Begin feedback and check that the file is "stolen". 3587 // Begin feedback and check that the file is "stolen".
3588 download_protection_service->feedback_service()->BeginFeedbackForDownload( 3588 download_protection_service->feedback_service()->BeginFeedbackForDownload(
3589 downloads[0]); 3589 downloads[0]);
3590 std::vector<DownloadItem*> updated_downloads; 3590 std::vector<DownloadItem*> updated_downloads;
3591 GetDownloads(browser(), &updated_downloads); 3591 GetDownloads(browser(), &updated_downloads);
3592 ASSERT_TRUE(updated_downloads.empty()); 3592 ASSERT_TRUE(updated_downloads.empty());
3593 } 3593 }
3594 #endif 3594 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698