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

Unified Diff: chrome/browser/managed_mode/managed_user_registration_utility.cc

Issue 22409002: Remove managed user registration timeout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/managed_mode/managed_user_registration_utility.cc
diff --git a/chrome/browser/managed_mode/managed_user_registration_utility.cc b/chrome/browser/managed_mode/managed_user_registration_utility.cc
index cc4ea803ee6f4be14a8ca3c38704a9156e6b4dd7..dca7bf57bb5ddb7da1c5555d1404896421b6e7f7 100644
--- a/chrome/browser/managed_mode/managed_user_registration_utility.cc
+++ b/chrome/browser/managed_mode/managed_user_registration_utility.cc
@@ -27,9 +27,6 @@
using base::DictionaryValue;
-// How long to wait before aborting user registration. If this is changed, the
-// histogram limits in the BrowserOptionsHandler should also be updated.
-const int kRegistrationTimeoutMS = 30 * 1000;
const char kAcknowledged[] = "acknowledged";
const char kName[] = "name";
const char kMasterKey[] = "masterKey";
@@ -85,7 +82,6 @@ void ManagedUserRegistrationUtility::Register(
DCHECK(pending_managed_user_id_.empty());
callback_ = callback;
pending_managed_user_id_ = managed_user_id;
- StartRegistrationTimer();
const DictionaryValue* dict = prefs_->GetDictionary(prefs::kManagedUsers);
is_existing_managed_user_ = dict->HasKey(managed_user_id);
@@ -103,22 +99,6 @@ void ManagedUserRegistrationUtility::Register(
weak_ptr_factory_.GetWeakPtr(), info.name));
}
-void ManagedUserRegistrationUtility::StartRegistrationTimer() {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kNoManagedUserRegistrationTimeout)) {
- return;
- }
-
- registration_timer_.Start(
- FROM_HERE,
- base::TimeDelta::FromMilliseconds(kRegistrationTimeoutMS),
- base::Bind(
- &ManagedUserRegistrationUtility::AbortPendingRegistration,
- weak_ptr_factory_.GetWeakPtr(),
- true, // Run the callback.
- GoogleServiceAuthError(GoogleServiceAuthError::CONNECTION_FAILED)));
-}
-
void ManagedUserRegistrationUtility::CancelPendingRegistration() {
AbortPendingRegistration(
false, // Don't run the callback. The error will be ignored.
@@ -181,7 +161,6 @@ void ManagedUserRegistrationUtility::AbortPendingRegistration(
void ManagedUserRegistrationUtility::CompleteRegistration(
bool run_callback,
const GoogleServiceAuthError& error) {
- registration_timer_.Stop();
if (callback_.is_null())
return;

Powered by Google App Engine
This is Rietveld 408576698