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

Side by Side Diff: components/signin/core/browser/signin_manager.cc

Issue 566933005: Do not display lock for hosted domains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ChromeOS test - part deux Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/signin/core/browser/signin_manager.h" 5 #include "components/signin/core/browser/signin_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 200 }
201 201
202 ClearTransientSigninData(); 202 ClearTransientSigninData();
203 203
204 const std::string account_id = GetAuthenticatedAccountId(); 204 const std::string account_id = GetAuthenticatedAccountId();
205 const std::string username = GetAuthenticatedUsername(); 205 const std::string username = GetAuthenticatedUsername();
206 const base::Time signin_time = 206 const base::Time signin_time =
207 base::Time::FromInternalValue( 207 base::Time::FromInternalValue(
208 client_->GetPrefs()->GetInt64(prefs::kSignedInTime)); 208 client_->GetPrefs()->GetInt64(prefs::kSignedInTime));
209 clear_authenticated_username(); 209 clear_authenticated_username();
210 client_->GetPrefs()->ClearPref(prefs::kGoogleServicesHostedDomain);
210 client_->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername); 211 client_->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername);
211 client_->GetPrefs()->ClearPref(prefs::kSignedInTime); 212 client_->GetPrefs()->ClearPref(prefs::kSignedInTime);
212 client_->ClearSigninScopedDeviceId(); 213 client_->ClearSigninScopedDeviceId();
213 214
214 // Erase (now) stale information from AboutSigninInternals. 215 // Erase (now) stale information from AboutSigninInternals.
215 NotifyDiagnosticsObservers(USERNAME, ""); 216 NotifyDiagnosticsObservers(USERNAME, "");
216 217
217 // Determine the duration the user was logged in and log that to UMA. 218 // Determine the duration the user was logged in and log that to UMA.
218 if (!signin_time.is_null()) { 219 if (!signin_time.is_null()) {
219 base::TimeDelta signed_in_duration = base::Time::Now() - signin_time; 220 base::TimeDelta signed_in_duration = base::Time::Now() - signin_time;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 390
390 password_.clear(); // Don't need it anymore. 391 password_.clear(); // Don't need it anymore.
391 DisableOneClickSignIn(client_->GetPrefs()); // Don't ever offer again. 392 DisableOneClickSignIn(client_->GetPrefs()); // Don't ever offer again.
392 } 393 }
393 394
394 void SigninManager::ProhibitSignout(bool prohibit_signout) { 395 void SigninManager::ProhibitSignout(bool prohibit_signout) {
395 prohibit_signout_ = prohibit_signout; 396 prohibit_signout_ = prohibit_signout;
396 } 397 }
397 398
398 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; } 399 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/manage_profile_handler.cc ('k') | components/signin/core/common/signin_pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698