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

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

Issue 9372091: Polished on side-loaded extension install alert. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Style fix. Created 8 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/extensions/extension_global_error.h" 5 #include "chrome/browser/extensions/extension_global_error.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 IDS_EXTENSION_ALERT_ITEM_EXTERNAL) + 87 IDS_EXTENSION_ALERT_ITEM_EXTERNAL) +
88 GenerateMessageSection(blacklisted_extension_ids_.get(), 88 GenerateMessageSection(blacklisted_extension_ids_.get(),
89 IDS_EXTENSION_ALERT_ITEM_BLACKLISTED) + 89 IDS_EXTENSION_ALERT_ITEM_BLACKLISTED) +
90 GenerateMessageSection(orphaned_extension_ids_.get(), 90 GenerateMessageSection(orphaned_extension_ids_.get(),
91 IDS_EXTENSION_ALERT_ITEM_ORPHANED); 91 IDS_EXTENSION_ALERT_ITEM_ORPHANED);
92 } 92 }
93 93
94 string16 ExtensionGlobalError::GetBubbleViewMessage() { 94 string16 ExtensionGlobalError::GetBubbleViewMessage() {
95 if (message_.empty()) { 95 if (message_.empty()) {
96 message_ = GenerateMessage(); 96 message_ = GenerateMessage();
97 if (message_[message_.size()-1] == '\n') 97 if (message_[message_.size() - 1] == '\n')
98 message_.resize(message_.size()-1); 98 message_.resize(message_.size() - 1);
99 } 99 }
100 return message_; 100 return message_;
101 } 101 }
102 102
103 string16 ExtensionGlobalError::GetBubbleViewAcceptButtonLabel() { 103 string16 ExtensionGlobalError::GetBubbleViewAcceptButtonLabel() {
104 return l10n_util::GetStringUTF16(IDS_EXTENSION_ALERT_ITEM_OK); 104 return l10n_util::GetStringUTF16(IDS_EXTENSION_ALERT_ITEM_OK);
105 } 105 }
106 106
107 string16 ExtensionGlobalError::GetBubbleViewCancelButtonLabel() { 107 string16 ExtensionGlobalError::GetBubbleViewCancelButtonLabel() {
108 return l10n_util::GetStringUTF16(IDS_EXTENSION_ALERT_ITEM_DETAILS); 108 return l10n_util::GetStringUTF16(IDS_EXTENSION_ALERT_ITEM_DETAILS);
109 } 109 }
110 110
111 void ExtensionGlobalError::OnBubbleViewDidClose(Browser* browser) { 111 void ExtensionGlobalError::OnBubbleViewDidClose(Browser* browser) {
112 extension_service_->HandleExtensionAlertClosed(); 112 extension_service_->HandleExtensionAlertClosed();
113 } 113 }
114 114
115 void ExtensionGlobalError::BubbleViewAcceptButtonPressed(Browser* browser) { 115 void ExtensionGlobalError::BubbleViewAcceptButtonPressed(Browser* browser) {
116 extension_service_->HandleExtensionAlertAccept(); 116 extension_service_->HandleExtensionAlertAccept();
117 } 117 }
118 118
119 void ExtensionGlobalError::BubbleViewCancelButtonPressed(Browser* browser) { 119 void ExtensionGlobalError::BubbleViewCancelButtonPressed(Browser* browser) {
120 extension_service_->HandleExtensionAlertDetails(browser); 120 extension_service_->HandleExtensionAlertDetails(browser);
121 } 121 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698