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

Unified Diff: chrome/browser/extensions/webstore_inline_installer.h

Issue 10907104: Support an --install-from-webstore command line switch (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: updated comment Created 8 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/extensions/webstore_inline_installer.h
diff --git a/chrome/browser/extensions/webstore_inline_installer.h b/chrome/browser/extensions/webstore_inline_installer.h
index c01b4814ae7e98ba87f60efe8d30d8b712e01923..1f8ef57080170a3cad6044cfbb9f93338fc17153 100644
--- a/chrome/browser/extensions/webstore_inline_installer.h
+++ b/chrome/browser/extensions/webstore_inline_installer.h
@@ -41,21 +41,16 @@ class WebstoreInlineInstaller
public WebstoreInstaller::Delegate,
public WebstoreInstallHelper::Delegate {
public:
- class Delegate {
- public:
- virtual void OnInlineInstallSuccess(int install_id,
- int return_route_id) = 0;
- virtual void OnInlineInstallFailure(int install_id,
- int return_route_id,
- const std::string& error) = 0;
- };
+ // A callback for when the install process completes successfully or not. If
+ // there was a failure, |success| will be false and |error| may contain a
+ // developer-readable error message about why it failed.
+ typedef base::Callback<void(bool success, const std::string& error)> Callback;
Mihai Parparita -not on Chrome 2012/09/07 22:01:36 This needs a base/callback.h #include.
asargent_no_longer_on_chrome 2012/09/14 23:24:35 Done.
WebstoreInlineInstaller(content::WebContents* web_contents,
- int install_id,
- int return_route_id,
std::string webstore_item_id,
+ bool require_verified_site,
Mihai Parparita -not on Chrome 2012/09/07 22:01:36 An enum param would be more readable.
asargent_no_longer_on_chrome 2012/09/14 23:24:35 Done.
GURL requestor_url,
- Delegate* d);
+ Callback callback);
void BeginInstall();
private:
@@ -115,11 +110,10 @@ class WebstoreInlineInstaller
static bool IsRequestorURLInVerifiedSite(const GURL& requestor_url,
const std::string& verified_site);
- int install_id_;
- int return_route_id_;
std::string id_;
+ bool require_verified_site_;
GURL requestor_url_;
- Delegate* delegate_;
+ Callback callback_;
scoped_ptr<ExtensionInstallPrompt> install_ui_;
// For fetching webstore JSON data.

Powered by Google App Engine
This is Rietveld 408576698