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

Side by Side Diff: chrome/browser/extensions/suspicious_extension_bubble_controller.cc

Issue 666153002: Standardize usage of virtual/override/final in chrome/browser/extensions/ (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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/extensions/suspicious_extension_bubble_controller.h" 5 #include "chrome/browser/extensions/suspicious_extension_bubble_controller.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/extensions/extension_message_bubble.h" 10 #include "chrome/browser/extensions/extension_message_bubble.h"
(...skipping 19 matching lines...) Expand all
30 base::LazyInstance<std::set<Profile*> > g_shown_for_profiles = 30 base::LazyInstance<std::set<Profile*> > g_shown_for_profiles =
31 LAZY_INSTANCE_INITIALIZER; 31 LAZY_INSTANCE_INITIALIZER;
32 32
33 //////////////////////////////////////////////////////////////////////////////// 33 ////////////////////////////////////////////////////////////////////////////////
34 // SuspiciousExtensionBubbleDelegate 34 // SuspiciousExtensionBubbleDelegate
35 35
36 class SuspiciousExtensionBubbleDelegate 36 class SuspiciousExtensionBubbleDelegate
37 : public ExtensionMessageBubbleController::Delegate { 37 : public ExtensionMessageBubbleController::Delegate {
38 public: 38 public:
39 explicit SuspiciousExtensionBubbleDelegate(Profile* profile); 39 explicit SuspiciousExtensionBubbleDelegate(Profile* profile);
40 virtual ~SuspiciousExtensionBubbleDelegate(); 40 ~SuspiciousExtensionBubbleDelegate() override;
41 41
42 // ExtensionMessageBubbleController::Delegate methods. 42 // ExtensionMessageBubbleController::Delegate methods.
43 virtual bool ShouldIncludeExtension(const std::string& extension_id) override; 43 bool ShouldIncludeExtension(const std::string& extension_id) override;
44 virtual void AcknowledgeExtension( 44 void AcknowledgeExtension(
45 const std::string& extension_id, 45 const std::string& extension_id,
46 ExtensionMessageBubbleController::BubbleAction user_action) override; 46 ExtensionMessageBubbleController::BubbleAction user_action) override;
47 virtual void PerformAction(const extensions::ExtensionIdList& list) override; 47 void PerformAction(const extensions::ExtensionIdList& list) override;
48 virtual base::string16 GetTitle() const override; 48 base::string16 GetTitle() const override;
49 virtual base::string16 GetMessageBody( 49 base::string16 GetMessageBody(bool anchored_to_browser_action) const override;
50 bool anchored_to_browser_action) const override; 50 base::string16 GetOverflowText(
51 virtual base::string16 GetOverflowText(
52 const base::string16& overflow_count) const override; 51 const base::string16& overflow_count) const override;
53 virtual GURL GetLearnMoreUrl() const override; 52 GURL GetLearnMoreUrl() const override;
54 virtual base::string16 GetActionButtonLabel() const override; 53 base::string16 GetActionButtonLabel() const override;
55 virtual base::string16 GetDismissButtonLabel() const override; 54 base::string16 GetDismissButtonLabel() const override;
56 virtual bool ShouldShowExtensionList() const override; 55 bool ShouldShowExtensionList() const override;
57 virtual void LogExtensionCount(size_t count) override; 56 void LogExtensionCount(size_t count) override;
58 virtual void LogAction( 57 void LogAction(
59 ExtensionMessageBubbleController::BubbleAction action) override; 58 ExtensionMessageBubbleController::BubbleAction action) override;
60 59
61 DISALLOW_COPY_AND_ASSIGN(SuspiciousExtensionBubbleDelegate); 60 DISALLOW_COPY_AND_ASSIGN(SuspiciousExtensionBubbleDelegate);
62 }; 61 };
63 62
64 SuspiciousExtensionBubbleDelegate::SuspiciousExtensionBubbleDelegate( 63 SuspiciousExtensionBubbleDelegate::SuspiciousExtensionBubbleDelegate(
65 Profile* profile) 64 Profile* profile)
66 : extensions::ExtensionMessageBubbleController::Delegate(profile) { 65 : extensions::ExtensionMessageBubbleController::Delegate(profile) {
67 set_acknowledged_flag_pref_name(kWipeoutAcknowledged); 66 set_acknowledged_flag_pref_name(kWipeoutAcknowledged);
68 } 67 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return !g_shown_for_profiles.Get().count(profile_->GetOriginalProfile()) && 170 return !g_shown_for_profiles.Get().count(profile_->GetOriginalProfile()) &&
172 !GetExtensionList().empty(); 171 !GetExtensionList().empty();
173 } 172 }
174 173
175 void SuspiciousExtensionBubbleController::Show(ExtensionMessageBubble* bubble) { 174 void SuspiciousExtensionBubbleController::Show(ExtensionMessageBubble* bubble) {
176 g_shown_for_profiles.Get().insert(profile_->GetOriginalProfile()); 175 g_shown_for_profiles.Get().insert(profile_->GetOriginalProfile());
177 ExtensionMessageBubbleController::Show(bubble); 176 ExtensionMessageBubbleController::Show(bubble);
178 } 177 }
179 178
180 } // namespace extensions 179 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/suspicious_extension_bubble_controller.h ('k') | chrome/browser/extensions/tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698