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

Unified Diff: chrome/browser/ui/views/extensions/extension_install_dialog_view.h

Issue 547253002: Ensure app install is aborted when the install dialog is closed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/extensions/extension_install_dialog_view.h
diff --git a/chrome/browser/ui/views/extensions/extension_install_dialog_view.h b/chrome/browser/ui/views/extensions/extension_install_dialog_view.h
index 604e9ae1e6a874f6398f10cf122b2137550e71d7..4c8a6273586856f571da9188ab5c4aae65897b92 100644
--- a/chrome/browser/ui/views/extensions/extension_install_dialog_view.h
+++ b/chrome/browser/ui/views/extensions/extension_install_dialog_view.h
@@ -69,6 +69,7 @@ class ExtensionInstallDialogView : public views::DialogDelegateView,
virtual int GetDefaultDialogButton() const OVERRIDE;
virtual bool Cancel() OVERRIDE;
virtual bool Accept() OVERRIDE;
+ virtual void OnClosed() OVERRIDE;
virtual ui::ModalType GetModalType() const OVERRIDE;
virtual base::string16 GetWindowTitle() const OVERRIDE;
virtual void Layout() OVERRIDE;
@@ -112,6 +113,10 @@ class ExtensionInstallDialogView : public views::DialogDelegateView,
// "Show permissions" links were shown and/or clicked.
void UpdateLinkActionHistogram(int action_type) const;
+ // Updates the install result histogram and notifies the |delegate_| when the
+ // install has been cancelled by the user.
+ void OnInstallAborted();
+
content::PageNavigator* navigator_;
ExtensionInstallPrompt::Delegate* delegate_;
scoped_refptr<ExtensionInstallPrompt::Prompt> prompt_;
@@ -149,6 +154,10 @@ class ExtensionInstallDialogView : public views::DialogDelegateView,
// ExperienceSampling: Track this UI event.
scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_;
+ // Set to true once the user's selection has been received and the
+ // |delegate_| has been notified.
+ bool handled_result_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionInstallDialogView);
};

Powered by Google App Engine
This is Rietveld 408576698