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

Side by Side Diff: chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc

Issue 271793003: components: Extract pref_registry component out of user_prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 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 "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h" 5 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/prefs/pref_service.h" 13 #include "base/prefs/pref_service.h"
14 #include "base/time/clock.h" 14 #include "base/time/clock.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "chrome/browser/chromeos/login/user_manager.h" 16 #include "chrome/browser/chromeos/login/user_manager.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
19 #include "components/user_prefs/pref_registry_syncable.h" 19 #include "components/pref_registry/pref_registry_syncable.h"
20 20
21 namespace chromeos { 21 namespace chromeos {
22 22
23 namespace { 23 namespace {
24 24
25 const int kDefaultSAMLOfflineSigninTimeLimit = 14 * 24 * 60 * 60; // 14 days. 25 const int kDefaultSAMLOfflineSigninTimeLimit = 14 * 24 * 60 * 60; // 14 days.
26 26
27 } // namespace 27 } // namespace
28 28
29 // static 29 // static
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if (!user) { 142 if (!user) {
143 NOTREACHED(); 143 NOTREACHED();
144 return; 144 return;
145 } 145 }
146 146
147 UserManager::Get()->SaveForceOnlineSignin(user->email(), true); 147 UserManager::Get()->SaveForceOnlineSignin(user->email(), true);
148 offline_signin_limit_timer_.reset(); 148 offline_signin_limit_timer_.reset();
149 } 149 }
150 150
151 } // namespace chromeos 151 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698