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

Unified Diff: chrome/browser/extensions/startup_helper.cc

Issue 481433005: Extensions: Move id_util functions to crx_file component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert last patchset. function returns Extension* and can't use an assert. Created 6 years, 4 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/startup_helper.cc
diff --git a/chrome/browser/extensions/startup_helper.cc b/chrome/browser/extensions/startup_helper.cc
index a662982adb0d7d592bcfe0ae896b9f599eb514b3..f9f1228c672ea38d09b1f806e337958ade469901 100644
--- a/chrome/browser/extensions/startup_helper.cc
+++ b/chrome/browser/extensions/startup_helper.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/chrome_extensions_client.h"
+#include "components/crx_file/id_util.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "extensions/common/extension.h"
@@ -313,7 +314,7 @@ void DeleteHelperAndRunCallback(AppInstallHelper* helper,
bool StartupHelper::InstallFromWebstore(const CommandLine& cmd_line,
Profile* profile) {
std::string id = cmd_line.GetSwitchValueASCII(switches::kInstallFromWebstore);
- if (!Extension::IdIsValid(id)) {
+ if (!crx_file::id_util::IdIsValid(id)) {
LOG(ERROR) << "Invalid id for " << switches::kInstallFromWebstore
<< " : '" << id << "'";
return false;
@@ -334,7 +335,7 @@ void StartupHelper::LimitedInstallFromWebstore(
Profile* profile,
base::Callback<void()> done_callback) {
std::string id = WebStoreIdFromLimitedInstallCmdLine(cmd_line);
- if (!Extension::IdIsValid(id)) {
+ if (!crx_file::id_util::IdIsValid(id)) {
LOG(ERROR) << "Invalid index for " << switches::kLimitedInstallFromWebstore;
done_callback.Run();
return;
« no previous file with comments | « chrome/browser/extensions/shared_module_service_unittest.cc ('k') | chrome/browser/extensions/test_extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698