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

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

Issue 1137503006: [Extensions] Polish the suspicious extension bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finnur's Created 5 years, 7 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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/ntp_overridden_bubble_controller.h" 5 #include "chrome/browser/extensions/ntp_overridden_bubble_controller.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 22 matching lines...) Expand all
33 ~NtpOverriddenBubbleDelegate() override; 33 ~NtpOverriddenBubbleDelegate() override;
34 34
35 // ExtensionMessageBubbleController::Delegate methods. 35 // ExtensionMessageBubbleController::Delegate methods.
36 bool ShouldIncludeExtension(const std::string& extension_id) override; 36 bool ShouldIncludeExtension(const std::string& extension_id) override;
37 void AcknowledgeExtension( 37 void AcknowledgeExtension(
38 const std::string& extension_id, 38 const std::string& extension_id,
39 extensions::ExtensionMessageBubbleController::BubbleAction user_action) 39 extensions::ExtensionMessageBubbleController::BubbleAction user_action)
40 override; 40 override;
41 void PerformAction(const extensions::ExtensionIdList& list) override; 41 void PerformAction(const extensions::ExtensionIdList& list) override;
42 base::string16 GetTitle() const override; 42 base::string16 GetTitle() const override;
43 base::string16 GetMessageBody(bool anchored_to_browser_action) const override; 43 base::string16 GetMessageBody(bool anchored_to_browser_action,
44 int extension_count) const override;
44 base::string16 GetOverflowText( 45 base::string16 GetOverflowText(
45 const base::string16& overflow_count) const override; 46 const base::string16& overflow_count) const override;
46 GURL GetLearnMoreUrl() const override; 47 GURL GetLearnMoreUrl() const override;
47 base::string16 GetActionButtonLabel() const override; 48 base::string16 GetActionButtonLabel() const override;
48 base::string16 GetDismissButtonLabel() const override; 49 base::string16 GetDismissButtonLabel() const override;
49 bool ShouldShowExtensionList() const override; 50 bool ShouldShowExtensionList() const override;
50 bool ShouldHighlightExtensions() const override; 51 bool ShouldHighlightExtensions() const override;
51 void RestrictToSingleExtension(const std::string& extension_id) override; 52 void RestrictToSingleExtension(const std::string& extension_id) override;
52 void LogExtensionCount(size_t count) override; 53 void LogExtensionCount(size_t count) override;
53 void LogAction(extensions::ExtensionMessageBubbleController::BubbleAction 54 void LogAction(extensions::ExtensionMessageBubbleController::BubbleAction
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 extensions::Extension::DISABLE_USER_ACTION); 106 extensions::Extension::DISABLE_USER_ACTION);
106 } 107 }
107 } 108 }
108 109
109 base::string16 NtpOverriddenBubbleDelegate::GetTitle() const { 110 base::string16 NtpOverriddenBubbleDelegate::GetTitle() const {
110 return l10n_util::GetStringUTF16( 111 return l10n_util::GetStringUTF16(
111 IDS_EXTENSIONS_NTP_CONTROLLED_TITLE_HOME_PAGE_BUBBLE); 112 IDS_EXTENSIONS_NTP_CONTROLLED_TITLE_HOME_PAGE_BUBBLE);
112 } 113 }
113 114
114 base::string16 NtpOverriddenBubbleDelegate::GetMessageBody( 115 base::string16 NtpOverriddenBubbleDelegate::GetMessageBody(
115 bool anchored_to_browser_action) const { 116 bool anchored_to_browser_action,
117 int extension_count) const {
116 base::string16 body = 118 base::string16 body =
117 l10n_util::GetStringUTF16(IDS_EXTENSIONS_NTP_CONTROLLED_FIRST_LINE); 119 l10n_util::GetStringUTF16(IDS_EXTENSIONS_NTP_CONTROLLED_FIRST_LINE);
118 body += l10n_util::GetStringUTF16( 120 body += l10n_util::GetStringUTF16(
119 IDS_EXTENSIONS_SETTINGS_API_THIRD_LINE_CONFIRMATION); 121 IDS_EXTENSIONS_SETTINGS_API_THIRD_LINE_CONFIRMATION);
120 return body; 122 return body;
121 } 123 }
122 124
123 base::string16 NtpOverriddenBubbleDelegate::GetOverflowText( 125 base::string16 NtpOverriddenBubbleDelegate::GetOverflowText(
124 const base::string16& overflow_count) const { 126 const base::string16& overflow_count) const {
125 // Does not have more than one extension in the list at a time. 127 // Does not have more than one extension in the list at a time.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 189
188 delegate()->RestrictToSingleExtension(extension_id); 190 delegate()->RestrictToSingleExtension(extension_id);
189 return true; 191 return true;
190 } 192 }
191 193
192 bool NtpOverriddenBubbleController::CloseOnDeactivate() { 194 bool NtpOverriddenBubbleController::CloseOnDeactivate() {
193 return true; 195 return true;
194 } 196 }
195 197
196 } // namespace extensions 198 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698