| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 IDS_EXTENSION_USER_COUNT, | 208 IDS_EXTENSION_USER_COUNT, |
| 209 UTF8ToUTF16(localized_user_count_)); | 209 UTF8ToUTF16(localized_user_count_)); |
| 210 } | 210 } |
| 211 | 211 |
| 212 size_t ExtensionInstallPrompt::Prompt::GetPermissionCount() const { | 212 size_t ExtensionInstallPrompt::Prompt::GetPermissionCount() const { |
| 213 return permissions_.size(); | 213 return permissions_.size(); |
| 214 } | 214 } |
| 215 | 215 |
| 216 string16 ExtensionInstallPrompt::Prompt::GetPermission(size_t index) const { | 216 string16 ExtensionInstallPrompt::Prompt::GetPermission(size_t index) const { |
| 217 CHECK_LT(index, permissions_.size()); | 217 CHECK_LT(index, permissions_.size()); |
| 218 return l10n_util::GetStringFUTF16( | 218 return permissions_[index]; |
| 219 IDS_EXTENSION_PERMISSION_LINE, permissions_[index]); | |
| 220 } | 219 } |
| 221 | 220 |
| 222 size_t ExtensionInstallPrompt::Prompt::GetOAuthIssueCount() const { | 221 size_t ExtensionInstallPrompt::Prompt::GetOAuthIssueCount() const { |
| 223 return oauth_issue_advice_.size(); | 222 return oauth_issue_advice_.size(); |
| 224 } | 223 } |
| 225 | 224 |
| 226 const IssueAdviceInfoEntry& ExtensionInstallPrompt::Prompt::GetOAuthIssue( | 225 const IssueAdviceInfoEntry& ExtensionInstallPrompt::Prompt::GetOAuthIssue( |
| 227 size_t index) const { | 226 size_t index) const { |
| 228 CHECK_LT(index, oauth_issue_advice_.size()); | 227 CHECK_LT(index, oauth_issue_advice_.size()); |
| 229 return oauth_issue_advice_[index]; | 228 return oauth_issue_advice_[index]; |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 Browser* browser) { | 506 Browser* browser) { |
| 508 // |browser| can be NULL in unit tests. | 507 // |browser| can be NULL in unit tests. |
| 509 if (!browser) | 508 if (!browser) |
| 510 return new ExtensionInstallPrompt(NULL, NULL, NULL); | 509 return new ExtensionInstallPrompt(NULL, NULL, NULL); |
| 511 gfx::NativeWindow parent = | 510 gfx::NativeWindow parent = |
| 512 browser->window() ? browser->window()->GetNativeWindow() : NULL; | 511 browser->window() ? browser->window()->GetNativeWindow() : NULL; |
| 513 return new ExtensionInstallPrompt(parent, browser, browser->profile()); | 512 return new ExtensionInstallPrompt(parent, browser, browser->profile()); |
| 514 } | 513 } |
| 515 | 514 |
| 516 } // namespace chrome | 515 } // namespace chrome |
| OLD | NEW |