| Index: chrome/browser/extensions/extension_install_prompt.cc | 
| =================================================================== | 
| --- chrome/browser/extensions/extension_install_prompt.cc	(revision 183257) | 
| +++ chrome/browser/extensions/extension_install_prompt.cc	(working copy) | 
| @@ -57,6 +57,7 @@ | 
| IDS_EXTENSION_RE_ENABLE_PROMPT_TITLE, | 
| IDS_EXTENSION_PERMISSIONS_PROMPT_TITLE, | 
| IDS_EXTENSION_EXTERNAL_INSTALL_PROMPT_TITLE, | 
| +  IDS_EXTENSION_POST_INSTALL_PERMISSIONS_PROMPT_TITLE, | 
| }; | 
| static const int kHeadingIds[ExtensionInstallPrompt::NUM_PROMPT_TYPES] = { | 
| IDS_EXTENSION_INSTALL_PROMPT_HEADING, | 
| @@ -65,7 +66,17 @@ | 
| IDS_EXTENSION_RE_ENABLE_PROMPT_HEADING, | 
| IDS_EXTENSION_PERMISSIONS_PROMPT_HEADING, | 
| 0,  // External installs use different strings for extensions/apps. | 
| +  IDS_EXTENSION_POST_INSTALL_PERMISSIONS_PROMPT_HEADING, | 
| }; | 
| +static const int kButtons[ExtensionInstallPrompt::NUM_PROMPT_TYPES] = { | 
| +  ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL, | 
| +  ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL, | 
| +  ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL, | 
| +  ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL, | 
| +  ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL, | 
| +  ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL, | 
| +  ui::DIALOG_BUTTON_CANCEL, | 
| +}; | 
| static const int kAcceptButtonIds[ExtensionInstallPrompt::NUM_PROMPT_TYPES] = { | 
| IDS_EXTENSION_PROMPT_INSTALL_BUTTON, | 
| IDS_EXTENSION_PROMPT_INSTALL_BUTTON, | 
| @@ -73,6 +84,7 @@ | 
| IDS_EXTENSION_PROMPT_RE_ENABLE_BUTTON, | 
| IDS_EXTENSION_PROMPT_PERMISSIONS_BUTTON, | 
| 0,  // External installs use different strings for extensions/apps. | 
| +  0, | 
| }; | 
| static const int kAbortButtonIds[ExtensionInstallPrompt::NUM_PROMPT_TYPES] = { | 
| 0,  // These all use the platform's default cancel label. | 
| @@ -81,6 +93,7 @@ | 
| 0, | 
| IDS_EXTENSION_PROMPT_PERMISSIONS_ABORT_BUTTON, | 
| IDS_EXTENSION_EXTERNAL_INSTALL_PROMPT_ABORT_BUTTON, | 
| +  IDS_CLOSE, | 
| }; | 
| static const int kPermissionsHeaderIds[ | 
| ExtensionInstallPrompt::NUM_PROMPT_TYPES] = { | 
| @@ -90,6 +103,7 @@ | 
| IDS_EXTENSION_PROMPT_WILL_NOW_HAVE_ACCESS_TO, | 
| IDS_EXTENSION_PROMPT_WANTS_ACCESS_TO, | 
| IDS_EXTENSION_PROMPT_WILL_HAVE_ACCESS_TO, | 
| +  IDS_EXTENSION_PROMPT_CAN_ACCESS, | 
| }; | 
| static const int kOAuthHeaderIds[ExtensionInstallPrompt::NUM_PROMPT_TYPES] = { | 
| IDS_EXTENSION_PROMPT_OAUTH_HEADER, | 
| @@ -100,6 +114,7 @@ | 
| // TODO(mpcomplete): Do we need this for external install UI? If we do, | 
| // we need to update FetchOAuthIssueAdviceIfNeeded. | 
| 0, | 
| +  0, | 
| }; | 
|  | 
| // Size of extension icon in top left of dialog. | 
| @@ -247,6 +262,14 @@ | 
| } | 
| } | 
|  | 
| +int ExtensionInstallPrompt::Prompt::GetDialogButtons() const { | 
| +  return kButtons[type_]; | 
| +} | 
| + | 
| +bool ExtensionInstallPrompt::Prompt::HasAcceptButtonLabel() const { | 
| +  return kAcceptButtonIds[type_] > 0; | 
| +} | 
| + | 
| string16 ExtensionInstallPrompt::Prompt::GetAcceptButtonLabel() const { | 
| if (type_ == EXTERNAL_INSTALL_PROMPT) { | 
| int id = -1; | 
| @@ -532,6 +555,17 @@ | 
| LoadImageIfNeeded(); | 
| } | 
|  | 
| +void ExtensionInstallPrompt::ReviewPermissions(Delegate* delegate, | 
| +                                               const Extension* extension) { | 
| +  DCHECK(ui_loop_ == MessageLoop::current()); | 
| +  extension_ = extension; | 
| +  permissions_ = extension->GetActivePermissions(); | 
| +  delegate_ = delegate; | 
| +  prompt_.set_type(POST_INSTALL_PERMISSIONS_PROMPT); | 
| + | 
| +  LoadImageIfNeeded(); | 
| +} | 
| + | 
| void ExtensionInstallPrompt::OnInstallSuccess(const Extension* extension, | 
| SkBitmap* icon) { | 
| extension_ = extension; | 
| @@ -644,7 +678,8 @@ | 
| case RE_ENABLE_PROMPT: | 
| case INLINE_INSTALL_PROMPT: | 
| case EXTERNAL_INSTALL_PROMPT: | 
| -    case INSTALL_PROMPT: { | 
| +    case INSTALL_PROMPT: | 
| +    case POST_INSTALL_PERMISSIONS_PROMPT: { | 
| prompt_.set_extension(extension_); | 
| prompt_.set_icon(gfx::Image::CreateFrom1xBitmap(icon_)); | 
| break; | 
|  |