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

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

Issue 146093006: Prompt for extension install on startup even when --force-app-mode is passed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/extensions/startup_helper.h" 5 #include "chrome/browser/extensions/startup_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 bool StartupHelper::InstallFromWebstore(const CommandLine& cmd_line, 286 bool StartupHelper::InstallFromWebstore(const CommandLine& cmd_line,
287 Profile* profile) { 287 Profile* profile) {
288 std::string id = cmd_line.GetSwitchValueASCII(switches::kInstallFromWebstore); 288 std::string id = cmd_line.GetSwitchValueASCII(switches::kInstallFromWebstore);
289 if (!Extension::IdIsValid(id)) { 289 if (!Extension::IdIsValid(id)) {
290 LOG(ERROR) << "Invalid id for " << switches::kInstallFromWebstore 290 LOG(ERROR) << "Invalid id for " << switches::kInstallFromWebstore
291 << " : '" << id << "'"; 291 << " : '" << id << "'";
292 return false; 292 return false;
293 } 293 }
294 294
295 AppInstallHelper helper; 295 AppInstallHelper helper;
296 helper.BeginInstall(profile, id, 296 helper.BeginInstall(
297 !cmd_line.HasSwitch(switches::kForceAppMode), 297 profile, id, true, base::MessageLoop::QuitWhenIdleClosure());
298 base::MessageLoop::QuitWhenIdleClosure());
299 298
300 base::MessageLoop::current()->Run(); 299 base::MessageLoop::current()->Run();
301 if (!helper.success()) 300 if (!helper.success())
302 LOG(ERROR) << "InstallFromWebstore failed with error: " << helper.error(); 301 LOG(ERROR) << "InstallFromWebstore failed with error: " << helper.error();
303 return helper.success(); 302 return helper.success();
304 } 303 }
305 304
306 void StartupHelper::LimitedInstallFromWebstore( 305 void StartupHelper::LimitedInstallFromWebstore(
307 const CommandLine& cmd_line, 306 const CommandLine& cmd_line,
308 Profile* profile, 307 Profile* profile,
(...skipping 23 matching lines...) Expand all
332 } 331 }
333 return id; 332 return id;
334 } 333 }
335 334
336 StartupHelper::~StartupHelper() { 335 StartupHelper::~StartupHelper() {
337 if (pack_job_.get()) 336 if (pack_job_.get())
338 pack_job_->ClearClient(); 337 pack_job_->ClearClient();
339 } 338 }
340 339
341 } // namespace extensions 340 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698