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

Side by Side Diff: chrome/installer/setup/install.cc

Issue 9972012: Resolve the conflict that auto-launch has with the background mode feature (part 1). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 #include "chrome/installer/setup/install.h" 5 #include "chrome/installer/setup/install.h"
6 6
7 #include <shlobj.h> 7 #include <shlobj.h>
8 #include <time.h> 8 #include <time.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 if (result == FIRST_INSTALL_SUCCESS) { 444 if (result == FIRST_INSTALL_SUCCESS) {
445 installer_state.UpdateStage(installer::CONFIGURE_AUTO_LAUNCH); 445 installer_state.UpdateStage(installer::CONFIGURE_AUTO_LAUNCH);
446 446
447 // Add auto-launch key if specified in master preferences. 447 // Add auto-launch key if specified in master preferences.
448 bool auto_launch_chrome = false; 448 bool auto_launch_chrome = false;
449 prefs.GetBool( 449 prefs.GetBool(
450 installer::master_preferences::kAutoLaunchChrome, 450 installer::master_preferences::kAutoLaunchChrome,
451 &auto_launch_chrome); 451 &auto_launch_chrome);
452 if (auto_launch_chrome) { 452 if (auto_launch_chrome) {
453 auto_launch_util::SetWillLaunchAtLogin( 453 auto_launch_util::SetWillLaunchAtLogin(
454 true,
455 installer_state.target_path(), 454 installer_state.target_path(),
456 ASCIIToUTF16(chrome::kInitialProfile)); 455 ASCIIToUTF16(chrome::kInitialProfile),
456 auto_launch_util::FLAG_ENABLE, // Auto start.
457 auto_launch_util::FLAG_PRESERVE); // Background mode.
457 } 458 }
458 } 459 }
459 } 460 }
460 461
461 installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS); 462 installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS);
462 463
463 installer_state.RemoveOldVersionDirectories( 464 installer_state.RemoveOldVersionDirectories(
464 new_version, 465 new_version,
465 existing_version.get(), 466 existing_version.get(),
466 install_temp_path); 467 install_temp_path);
467 } 468 }
468 469
469 return result; 470 return result;
470 } 471 }
471 472
472 } // namespace installer 473 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698