OLD | NEW |
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_install_prompt.h" | 5 #include "chrome/browser/extensions/extension_install_prompt.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 IDS_EXTENSION_USER_COUNT, | 207 IDS_EXTENSION_USER_COUNT, |
208 UTF8ToUTF16(localized_user_count_)); | 208 UTF8ToUTF16(localized_user_count_)); |
209 } | 209 } |
210 | 210 |
211 size_t ExtensionInstallPrompt::Prompt::GetPermissionCount() const { | 211 size_t ExtensionInstallPrompt::Prompt::GetPermissionCount() const { |
212 return permissions_.size(); | 212 return permissions_.size(); |
213 } | 213 } |
214 | 214 |
215 string16 ExtensionInstallPrompt::Prompt::GetPermission(size_t index) const { | 215 string16 ExtensionInstallPrompt::Prompt::GetPermission(size_t index) const { |
216 CHECK_LT(index, permissions_.size()); | 216 CHECK_LT(index, permissions_.size()); |
217 return l10n_util::GetStringFUTF16( | 217 return permissions_[index]; |
218 IDS_EXTENSION_PERMISSION_LINE, permissions_[index]); | |
219 } | 218 } |
220 | 219 |
221 size_t ExtensionInstallPrompt::Prompt::GetOAuthIssueCount() const { | 220 size_t ExtensionInstallPrompt::Prompt::GetOAuthIssueCount() const { |
222 return oauth_issue_advice_.size(); | 221 return oauth_issue_advice_.size(); |
223 } | 222 } |
224 | 223 |
225 const IssueAdviceInfoEntry& ExtensionInstallPrompt::Prompt::GetOAuthIssue( | 224 const IssueAdviceInfoEntry& ExtensionInstallPrompt::Prompt::GetOAuthIssue( |
226 size_t index) const { | 225 size_t index) const { |
227 CHECK_LT(index, oauth_issue_advice_.size()); | 226 CHECK_LT(index, oauth_issue_advice_.size()); |
228 return oauth_issue_advice_[index]; | 227 return oauth_issue_advice_[index]; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 Browser* browser) { | 503 Browser* browser) { |
505 // |browser| can be NULL in unit tests. | 504 // |browser| can be NULL in unit tests. |
506 if (!browser) | 505 if (!browser) |
507 return new ExtensionInstallPrompt(NULL, NULL, NULL); | 506 return new ExtensionInstallPrompt(NULL, NULL, NULL); |
508 gfx::NativeWindow parent = | 507 gfx::NativeWindow parent = |
509 browser->window() ? browser->window()->GetNativeWindow() : NULL; | 508 browser->window() ? browser->window()->GetNativeWindow() : NULL; |
510 return new ExtensionInstallPrompt(parent, browser, browser->profile()); | 509 return new ExtensionInstallPrompt(parent, browser, browser->profile()); |
511 } | 510 } |
512 | 511 |
513 } // namespace chrome | 512 } // namespace chrome |
OLD | NEW |