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

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

Issue 9317002: Make the auto-launch experiment profile-aware. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Delete the Run key on profile deletion Created 8 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
OLDNEW
1 // Copyright (c) 2011 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
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/file_path.h" 12 #include "base/file_path.h"
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "base/string_util.h" 17 #include "base/string_util.h"
18 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "chrome/common/chrome_constants.h"
19 #include "chrome/installer/setup/setup_constants.h" 20 #include "chrome/installer/setup/setup_constants.h"
20 #include "chrome/installer/setup/install_worker.h" 21 #include "chrome/installer/setup/install_worker.h"
21 #include "chrome/installer/util/auto_launch_util.h" 22 #include "chrome/installer/util/auto_launch_util.h"
22 #include "chrome/installer/util/browser_distribution.h" 23 #include "chrome/installer/util/browser_distribution.h"
23 #include "chrome/installer/util/create_reg_key_work_item.h" 24 #include "chrome/installer/util/create_reg_key_work_item.h"
24 #include "chrome/installer/util/delete_after_reboot_helper.h" 25 #include "chrome/installer/util/delete_after_reboot_helper.h"
25 #include "chrome/installer/util/google_update_constants.h" 26 #include "chrome/installer/util/google_update_constants.h"
26 #include "chrome/installer/util/helper.h" 27 #include "chrome/installer/util/helper.h"
27 #include "chrome/installer/util/install_util.h" 28 #include "chrome/installer/util/install_util.h"
28 #include "chrome/installer/util/installation_state.h" 29 #include "chrome/installer/util/installation_state.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 if (result == FIRST_INSTALL_SUCCESS) { 417 if (result == FIRST_INSTALL_SUCCESS) {
417 installer_state.UpdateStage(installer::CONFIGURE_AUTO_LAUNCH); 418 installer_state.UpdateStage(installer::CONFIGURE_AUTO_LAUNCH);
418 419
419 // Add auto-launch key if specified in master preferences. 420 // Add auto-launch key if specified in master preferences.
420 bool auto_launch_chrome = false; 421 bool auto_launch_chrome = false;
421 prefs.GetBool( 422 prefs.GetBool(
422 installer::master_preferences::kAutoLaunchChrome, 423 installer::master_preferences::kAutoLaunchChrome,
423 &auto_launch_chrome); 424 &auto_launch_chrome);
424 if (auto_launch_chrome) { 425 if (auto_launch_chrome) {
425 auto_launch_util::SetWillLaunchAtLogin( 426 auto_launch_util::SetWillLaunchAtLogin(
426 true, installer_state.target_path()); 427 true,
428 installer_state.target_path(),
429 ASCIIToUTF16(chrome::kInitialProfile));
427 } 430 }
428 } 431 }
429 } 432 }
430 433
431 installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS); 434 installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS);
432 435
433 installer_state.RemoveOldVersionDirectories( 436 installer_state.RemoveOldVersionDirectories(
434 new_version, 437 new_version,
435 existing_version.get(), 438 existing_version.get(),
436 install_temp_path); 439 install_temp_path);
437 } 440 }
438 441
439 return result; 442 return result;
440 } 443 }
441 444
442 } // namespace installer 445 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698