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

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

Issue 312403003: Revert 275229 "Add an extension override bubble and warning box ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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) 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 24 matching lines...) Expand all
35 explicit SuspiciousExtensionBubbleDelegate(Profile* profile); 35 explicit SuspiciousExtensionBubbleDelegate(Profile* profile);
36 virtual ~SuspiciousExtensionBubbleDelegate(); 36 virtual ~SuspiciousExtensionBubbleDelegate();
37 37
38 // ExtensionMessageBubbleController::Delegate methods. 38 // ExtensionMessageBubbleController::Delegate methods.
39 virtual bool ShouldIncludeExtension(const std::string& extension_id) OVERRIDE; 39 virtual bool ShouldIncludeExtension(const std::string& extension_id) OVERRIDE;
40 virtual void AcknowledgeExtension( 40 virtual void AcknowledgeExtension(
41 const std::string& extension_id, 41 const std::string& extension_id,
42 ExtensionMessageBubbleController::BubbleAction user_action) OVERRIDE; 42 ExtensionMessageBubbleController::BubbleAction user_action) OVERRIDE;
43 virtual void PerformAction(const extensions::ExtensionIdList& list) OVERRIDE; 43 virtual void PerformAction(const extensions::ExtensionIdList& list) OVERRIDE;
44 virtual base::string16 GetTitle() const OVERRIDE; 44 virtual base::string16 GetTitle() const OVERRIDE;
45 virtual base::string16 GetMessageBody( 45 virtual base::string16 GetMessageBody() const OVERRIDE;
46 bool anchored_to_browser_action) const OVERRIDE;
47 virtual base::string16 GetOverflowText( 46 virtual base::string16 GetOverflowText(
48 const base::string16& overflow_count) const OVERRIDE; 47 const base::string16& overflow_count) const OVERRIDE;
49 virtual base::string16 GetLearnMoreLabel() const OVERRIDE; 48 virtual base::string16 GetLearnMoreLabel() const OVERRIDE;
50 virtual GURL GetLearnMoreUrl() const OVERRIDE; 49 virtual GURL GetLearnMoreUrl() const OVERRIDE;
51 virtual base::string16 GetActionButtonLabel() const OVERRIDE; 50 virtual base::string16 GetActionButtonLabel() const OVERRIDE;
52 virtual base::string16 GetDismissButtonLabel() const OVERRIDE; 51 virtual base::string16 GetDismissButtonLabel() const OVERRIDE;
53 virtual bool ShouldShowExtensionList() const OVERRIDE; 52 virtual bool ShouldShowExtensionList() const OVERRIDE;
54 virtual void LogExtensionCount(size_t count) OVERRIDE; 53 virtual void LogExtensionCount(size_t count) OVERRIDE;
55 virtual void LogAction( 54 virtual void LogAction(
56 ExtensionMessageBubbleController::BubbleAction action) OVERRIDE; 55 ExtensionMessageBubbleController::BubbleAction action) OVERRIDE;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 void SuspiciousExtensionBubbleDelegate::PerformAction( 91 void SuspiciousExtensionBubbleDelegate::PerformAction(
93 const extensions::ExtensionIdList& list) { 92 const extensions::ExtensionIdList& list) {
94 // This bubble solicits no action from the user. Or as Nimoy would have it: 93 // This bubble solicits no action from the user. Or as Nimoy would have it:
95 // "Well, my work here is done". 94 // "Well, my work here is done".
96 } 95 }
97 96
98 base::string16 SuspiciousExtensionBubbleDelegate::GetTitle() const { 97 base::string16 SuspiciousExtensionBubbleDelegate::GetTitle() const {
99 return l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNSUPPORTED_DISABLED_TITLE); 98 return l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNSUPPORTED_DISABLED_TITLE);
100 } 99 }
101 100
102 base::string16 SuspiciousExtensionBubbleDelegate::GetMessageBody( 101 base::string16 SuspiciousExtensionBubbleDelegate::GetMessageBody() const {
103 bool anchored_to_browser_action) const {
104 return l10n_util::GetStringFUTF16(IDS_EXTENSIONS_UNSUPPORTED_DISABLED_BODY, 102 return l10n_util::GetStringFUTF16(IDS_EXTENSIONS_UNSUPPORTED_DISABLED_BODY,
105 l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE)); 103 l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE));
106 } 104 }
107 105
108 base::string16 SuspiciousExtensionBubbleDelegate::GetOverflowText( 106 base::string16 SuspiciousExtensionBubbleDelegate::GetOverflowText(
109 const base::string16& overflow_count) const { 107 const base::string16& overflow_count) const {
110 return l10n_util::GetStringFUTF16( 108 return l10n_util::GetStringFUTF16(
111 IDS_EXTENSIONS_DISABLED_AND_N_MORE, 109 IDS_EXTENSIONS_DISABLED_AND_N_MORE,
112 overflow_count); 110 overflow_count);
113 } 111 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return !g_shown_for_profiles.Get().count(profile_->GetOriginalProfile()) && 173 return !g_shown_for_profiles.Get().count(profile_->GetOriginalProfile()) &&
176 !GetExtensionList().empty(); 174 !GetExtensionList().empty();
177 } 175 }
178 176
179 void SuspiciousExtensionBubbleController::Show(ExtensionMessageBubble* bubble) { 177 void SuspiciousExtensionBubbleController::Show(ExtensionMessageBubble* bubble) {
180 g_shown_for_profiles.Get().insert(profile_->GetOriginalProfile()); 178 g_shown_for_profiles.Get().insert(profile_->GetOriginalProfile());
181 ExtensionMessageBubbleController::Show(bubble); 179 ExtensionMessageBubbleController::Show(bubble);
182 } 180 }
183 181
184 } // namespace extensions 182 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698