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

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

Issue 665253002: Standardize usage of virtual/override/final in chrome/browser/download/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 "chrome/browser/download/download_danger_prompt.h" 5 #include "chrome/browser/download/download_danger_prompt.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/download/chrome_download_manager_delegate.h" 10 #include "chrome/browser/download/chrome_download_manager_delegate.h"
(...skipping 17 matching lines...) Expand all
28 28
29 // Implements DownloadDangerPrompt using a TabModalConfirmDialog. 29 // Implements DownloadDangerPrompt using a TabModalConfirmDialog.
30 class DownloadDangerPromptImpl : public DownloadDangerPrompt, 30 class DownloadDangerPromptImpl : public DownloadDangerPrompt,
31 public content::DownloadItem::Observer, 31 public content::DownloadItem::Observer,
32 public TabModalConfirmDialogDelegate { 32 public TabModalConfirmDialogDelegate {
33 public: 33 public:
34 DownloadDangerPromptImpl(content::DownloadItem* item, 34 DownloadDangerPromptImpl(content::DownloadItem* item,
35 content::WebContents* web_contents, 35 content::WebContents* web_contents,
36 bool show_context, 36 bool show_context,
37 const OnDone& done); 37 const OnDone& done);
38 virtual ~DownloadDangerPromptImpl(); 38 ~DownloadDangerPromptImpl() override;
39 39
40 // DownloadDangerPrompt: 40 // DownloadDangerPrompt:
41 virtual void InvokeActionForTesting(Action action) override; 41 void InvokeActionForTesting(Action action) override;
42 42
43 private: 43 private:
44 // content::DownloadItem::Observer: 44 // content::DownloadItem::Observer:
45 virtual void OnDownloadUpdated(content::DownloadItem* download) override; 45 void OnDownloadUpdated(content::DownloadItem* download) override;
46 46
47 // TabModalConfirmDialogDelegate: 47 // TabModalConfirmDialogDelegate:
48 virtual base::string16 GetTitle() override; 48 base::string16 GetTitle() override;
49 virtual base::string16 GetDialogMessage() override; 49 base::string16 GetDialogMessage() override;
50 virtual base::string16 GetAcceptButtonTitle() override; 50 base::string16 GetAcceptButtonTitle() override;
51 virtual base::string16 GetCancelButtonTitle() override; 51 base::string16 GetCancelButtonTitle() override;
52 virtual void OnAccepted() override; 52 void OnAccepted() override;
53 virtual void OnCanceled() override; 53 void OnCanceled() override;
54 virtual void OnClosed() override; 54 void OnClosed() override;
55 55
56 void RunDone(Action action); 56 void RunDone(Action action);
57 57
58 content::DownloadItem* download_; 58 content::DownloadItem* download_;
59 bool show_context_; 59 bool show_context_;
60 OnDone done_; 60 OnDone done_;
61 61
62 scoped_ptr<ExperienceSamplingEvent> sampling_event_; 62 scoped_ptr<ExperienceSamplingEvent> sampling_event_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(DownloadDangerPromptImpl); 64 DISALLOW_COPY_AND_ASSIGN(DownloadDangerPromptImpl);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 content::WebContents* web_contents, 256 content::WebContents* web_contents,
257 bool show_context, 257 bool show_context,
258 const OnDone& done) { 258 const OnDone& done) {
259 DownloadDangerPromptImpl* prompt = new DownloadDangerPromptImpl( 259 DownloadDangerPromptImpl* prompt = new DownloadDangerPromptImpl(
260 item, web_contents, show_context, done); 260 item, web_contents, show_context, done);
261 // |prompt| will be deleted when the dialog is done. 261 // |prompt| will be deleted when the dialog is done.
262 TabModalConfirmDialog::Create(prompt, web_contents); 262 TabModalConfirmDialog::Create(prompt, web_contents);
263 return prompt; 263 return prompt;
264 } 264 }
265 #endif 265 #endif
OLDNEW
« no previous file with comments | « chrome/browser/download/download_completion_blocker.h ('k') | chrome/browser/download/download_dir_policy_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698