summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-02 22:11:37 +0000
committersreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-02 22:11:37 +0000
commit0c9d6bb1242ef34989da59b8ce4d697247ba8310 (patch)
treeb22660a46498c91161b7bea7ecf104e68b4deef1 /chrome
parent4dfb8f00b69ec3dde0660c4790a469df5596a3ab (diff)
downloadchromium_src-0c9d6bb1242ef34989da59b8ce4d697247ba8310.zip
chromium_src-0c9d6bb1242ef34989da59b8ce4d697247ba8310.tar.gz
chromium_src-0c9d6bb1242ef34989da59b8ce4d697247ba8310.tar.bz2
Remove kInstantEnabledTime.
This is not being used, and there are no plans to use it in the future. BUG=none TEST=none Review URL: http://codereview.chromium.org/9958037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130224 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/instant/instant_controller.cc32
-rw-r--r--chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc5
-rw-r--r--chrome/common/pref_names.cc3
-rw-r--r--chrome/common/pref_names.h1
4 files changed, 2 insertions, 39 deletions
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index b1d6e3f..f6018d0 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -69,31 +69,12 @@ void InstantController::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kInstantEnabledOnce,
false,
PrefService::SYNCABLE_PREF);
- prefs->RegisterInt64Pref(prefs::kInstantEnabledTime,
- false,
- PrefService::SYNCABLE_PREF);
PromoCounter::RegisterUserPrefs(prefs, prefs::kInstantPromo);
}
// static
void InstantController::RecordMetrics(Profile* profile) {
- if (!IsEnabled(profile))
- return;
-
- PrefService* service = profile->GetPrefs();
- if (service) {
- int64 enable_time = service->GetInt64(prefs::kInstantEnabledTime);
- if (!enable_time) {
- service->SetInt64(prefs::kInstantEnabledTime,
- base::Time::Now().ToInternalValue());
- } else {
- base::TimeDelta delta =
- base::Time::Now() - base::Time::FromInternalValue(enable_time);
- // Histogram from 1 hour to 30 days.
- UMA_HISTOGRAM_CUSTOM_COUNTS("Instant.EnabledTime.Predictive",
- delta.InHours(), 1, 30 * 24, 50);
- }
- }
+ UMA_HISTOGRAM_ENUMERATION("Instant.Status", IsEnabled(profile), 2);
}
// static
@@ -121,8 +102,6 @@ void InstantController::Enable(Profile* profile) {
service->SetBoolean(prefs::kInstantEnabledOnce, true);
service->SetBoolean(prefs::kInstantEnabled, true);
service->SetBoolean(prefs::kInstantConfirmDialogShown, true);
- service->SetInt64(prefs::kInstantEnabledTime,
- base::Time::Now().ToInternalValue());
}
// static
@@ -131,15 +110,6 @@ void InstantController::Disable(Profile* profile) {
if (!service || !IsEnabled(profile))
return;
- int64 enable_time = service->GetInt64(prefs::kInstantEnabledTime);
- if (enable_time) {
- base::TimeDelta delta =
- base::Time::Now() - base::Time::FromInternalValue(enable_time);
- // Histogram from 1 minute to 10 days.
- UMA_HISTOGRAM_CUSTOM_COUNTS("Instant.TimeToDisable.Predictive",
- delta.InMinutes(), 1, 60 * 24 * 10, 50);
- }
-
base::Histogram* histogram = base::LinearHistogram::FactoryGet(
"Instant.Preference" + InstantFieldTrial::GetGroupName(profile), 1, 2, 3,
base::Histogram::kUmaTargetedHistogramFlag);
diff --git a/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc b/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
index a850373..9ede498 100644
--- a/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -184,18 +184,15 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, kEnableInstant) {
ASSERT_TRUE(BooleanPrefMatches(prefs::kInstantConfirmDialogShown));
ASSERT_TRUE(BooleanPrefMatches(prefs::kInstantEnabled));
ASSERT_TRUE(BooleanPrefMatches(prefs::kInstantEnabledOnce));
- ASSERT_TRUE(Int64PrefMatches(prefs::kInstantEnabledTime));
ChangeBooleanPref(0, prefs::kInstantConfirmDialogShown);
ChangeBooleanPref(0, prefs::kInstantEnabled);
ChangeBooleanPref(0, prefs::kInstantEnabledOnce);
- ChangeInt64Pref(0, prefs::kInstantEnabledTime, 1);
ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
ASSERT_TRUE(BooleanPrefMatches(prefs::kInstantConfirmDialogShown));
ASSERT_TRUE(BooleanPrefMatches(prefs::kInstantEnabled));
ASSERT_TRUE(BooleanPrefMatches(prefs::kInstantEnabledOnce));
- ASSERT_TRUE(Int64PrefMatches(prefs::kInstantEnabledTime));
}
// TCM ID - 3611311.
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 9df8bb8..4eb6999 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -406,9 +406,6 @@ const char kInstantEnabled[] = "instant.enabled";
// Boolean pref indicating if instant was ever enabled.
const char kInstantEnabledOnce[] = "instant.enabled_once";
-// Time when instant was last enabled.
-const char kInstantEnabledTime[] = "instant.enabled_time";
-
// Used to maintain instant promo keys. See PromoCounter for details of subkeys
// that are used.
const char kInstantPromo[] = "instant.promo";
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 6cc7d14..a770e81 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -155,7 +155,6 @@ extern const char kUrlWhitelist[];
extern const char kInstantConfirmDialogShown[];
extern const char kInstantEnabled[];
extern const char kInstantEnabledOnce[];
-extern const char kInstantEnabledTime[];
extern const char kInstantPromo[];
extern const char kMultipleProfilePrefMigration[];
extern const char kNetworkPredictionEnabled[];