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

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: '' 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 416
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) {
426 FilePath profile_path =
427 chrome_install->GetUserDataPath().AppendASCII(
428 chrome::kInitialProfile);
425 auto_launch_util::SetWillLaunchAtLogin( 429 auto_launch_util::SetWillLaunchAtLogin(
426 true, installer_state.target_path()); 430 true, installer_state.target_path(), profile_path);
427 } 431 }
428 } 432 }
429 } 433 }
430 434
431 installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS); 435 installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS);
432 436
433 installer_state.RemoveOldVersionDirectories( 437 installer_state.RemoveOldVersionDirectories(
434 new_version, 438 new_version,
435 existing_version.get(), 439 existing_version.get(),
436 install_temp_path); 440 install_temp_path);
437 } 441 }
438 442
439 return result; 443 return result;
440 } 444 }
441 445
442 } // namespace installer 446 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698