OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // This file defines specific implementation of BrowserDistribution class for | 5 // This file defines specific implementation of BrowserDistribution class for |
6 // Google Chrome. | 6 // Google Chrome. |
7 | 7 |
8 #include "chrome/installer/util/google_chrome_distribution.h" | 8 #include "chrome/installer/util/google_chrome_distribution.h" |
9 | 9 |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 // Time to verify the conditions for the experiment. | 506 // Time to verify the conditions for the experiment. |
507 std::wstring client_info; | 507 std::wstring client_info; |
508 if (GoogleUpdateSettings::GetClient(&client_info)) { | 508 if (GoogleUpdateSettings::GetClient(&client_info)) { |
509 // The user might be participating on another experiment. The only | 509 // The user might be participating on another experiment. The only |
510 // users eligible for this experiment are that have no client info. | 510 // users eligible for this experiment are that have no client info. |
511 return; | 511 return; |
512 } | 512 } |
513 // Check browser usage inactivity by the age of the last-write time of the | 513 // Check browser usage inactivity by the age of the last-write time of the |
514 // chrome user data directory. | 514 // chrome user data directory. |
515 std::wstring user_data_dir = installer::GetChromeUserDataPath(); | 515 std::wstring user_data_dir = installer::GetChromeUserDataPath(); |
516 const int kThirtyDays = 30 * 24; | 516 // TODO(cpu): re-enable experiment. |
| 517 const int kThirtyDays = 3000 * 24; |
517 int dir_age_hours = GetDirectoryWriteAgeInHours(user_data_dir.c_str()); | 518 int dir_age_hours = GetDirectoryWriteAgeInHours(user_data_dir.c_str()); |
518 if (dir_age_hours < 0) { | 519 if (dir_age_hours < 0) { |
519 // This means that we failed to find the user data dir. The most likey | 520 // This means that we failed to find the user data dir. The most likey |
520 // cause is that this user has not ever used chrome at all which can | 521 // cause is that this user has not ever used chrome at all which can |
521 // happen in a system-level install. | 522 // happen in a system-level install. |
522 GoogleUpdateSettings::SetClient( | 523 GoogleUpdateSettings::SetClient( |
523 GetExperimentGroup(kToastUDDirFailure, flavor)); | 524 GetExperimentGroup(kToastUDDirFailure, flavor)); |
524 return; | 525 return; |
525 } else if (dir_age_hours < kThirtyDays) { | 526 } else if (dir_age_hours < kThirtyDays) { |
526 // An active user, so it does not qualify. | 527 // An active user, so it does not qualify. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 GoogleUpdateSettings::SetClient(GetExperimentGroup(outcome, flavor)); | 582 GoogleUpdateSettings::SetClient(GetExperimentGroup(outcome, flavor)); |
582 if (outcome != kToastExpUninstallGroup) | 583 if (outcome != kToastExpUninstallGroup) |
583 return; | 584 return; |
584 // The user wants to uninstall. This is a best effort operation. Note that | 585 // The user wants to uninstall. This is a best effort operation. Note that |
585 // we waited for chrome to exit so the uninstall would not detect chrome | 586 // we waited for chrome to exit so the uninstall would not detect chrome |
586 // running. | 587 // running. |
587 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(system_install), | 588 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(system_install), |
588 false, false, NULL); | 589 false, false, NULL); |
589 } | 590 } |
590 #endif | 591 #endif |
OLD | NEW |