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

Side by Side Diff: chrome/browser/extensions/startup_helper.h

Issue 412043003: Make --install-chrome-app use extensions::WebstoreInstallWithPrompt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_
6 #define CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "chrome/browser/extensions/pack_extension_job.h" 9 #include "chrome/browser/extensions/pack_extension_job.h"
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Handle --limited-install-from-webstore flag from |cmd_line| by downloading 46 // Handle --limited-install-from-webstore flag from |cmd_line| by downloading
47 // metadata from the webstore for the given id, prompting the user to 47 // metadata from the webstore for the given id, prompting the user to
48 // confirm, and then downloading the crx and installing it. 48 // confirm, and then downloading the crx and installing it.
49 // This whole process is only kicked off by this function and completed 49 // This whole process is only kicked off by this function and completed
50 // asynchronously unlike InstallFromWebstore which finishes everything before 50 // asynchronously unlike InstallFromWebstore which finishes everything before
51 // returning. 51 // returning.
52 void LimitedInstallFromWebstore(const base::CommandLine& cmd_line, 52 void LimitedInstallFromWebstore(const base::CommandLine& cmd_line,
53 Profile* profile, 53 Profile* profile,
54 base::Callback<void()> done_callback); 54 base::Callback<void()> done_callback);
55 55
56 // Handle --install-chrome-app flag from |cmd_line| by downloading metadata
57 // from the webstore for the given id, prompting the user to confirm, and then
58 // downloading the crx and installing it.
59 // Like InstallFromWebstore but this is asynchronous.
60 void InstallChromeApp(const base::CommandLine& cmd_line, Profile* profile);
61
56 // Maps the command line argument to the extension id. Returns an empty string 62 // Maps the command line argument to the extension id. Returns an empty string
57 // in the case when there is no mapping. 63 // in the case when there is no mapping.
58 std::string WebStoreIdFromLimitedInstallCmdLine( 64 std::string WebStoreIdFromLimitedInstallCmdLine(
59 const base::CommandLine& cmd_line); 65 const base::CommandLine& cmd_line);
60 private: 66 private:
61 scoped_refptr<PackExtensionJob> pack_job_; 67 scoped_refptr<PackExtensionJob> pack_job_;
62 bool pack_job_succeeded_; 68 bool pack_job_succeeded_;
63 69
64 DISALLOW_COPY_AND_ASSIGN(StartupHelper); 70 DISALLOW_COPY_AND_ASSIGN(StartupHelper);
65 }; 71 };
66 72
67 } // namespace extensions 73 } // namespace extensions
68 74
69 #endif // CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_ 75 #endif // CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698