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

Side by Side Diff: chrome/browser/chromeos/policy/recommendation_restorer.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/policy/recommendation_restorer.h" 5 #include "chrome/browser/chromeos/policy/recommendation_restorer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/prefs/pref_service.h"
12 #include "base/time/time.h" 11 #include "base/time/time.h"
13 #include "base/values.h" 12 #include "base/values.h"
14 #include "chrome/browser/chrome_notification_types.h" 13 #include "chrome/browser/chrome_notification_types.h"
15 #include "chrome/browser/chromeos/profiles/profile_helper.h" 14 #include "chrome/browser/chromeos/profiles/profile_helper.h"
16 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "components/prefs/pref_service.h"
18 #include "content/public/browser/notification_details.h" 18 #include "content/public/browser/notification_details.h"
19 #include "content/public/browser/notification_service.h" 19 #include "content/public/browser/notification_service.h"
20 #include "content/public/browser/notification_source.h" 20 #include "content/public/browser/notification_source.h"
21 #include "ui/base/user_activity/user_activity_detector.h" 21 #include "ui/base/user_activity/user_activity_detector.h"
22 22
23 namespace policy { 23 namespace policy {
24 24
25 namespace { 25 namespace {
26 // The amount of idle time after which recommended values are restored. 26 // The amount of idle time after which recommended values are restored.
27 const int kRestoreDelayInMs = 60 * 1000; // 1 minute. 27 const int kRestoreDelayInMs = 60 * 1000; // 1 minute.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 base::Unretained(this))); 154 base::Unretained(this)));
155 } 155 }
156 156
157 void RecommendationRestorer::StopTimer() { 157 void RecommendationRestorer::StopTimer() {
158 restore_timer_.Stop(); 158 restore_timer_.Stop();
159 if (ui::UserActivityDetector::Get()) 159 if (ui::UserActivityDetector::Get())
160 ui::UserActivityDetector::Get()->RemoveObserver(this); 160 ui::UserActivityDetector::Get()->RemoveObserver(this);
161 } 161 }
162 162
163 } // namespace policy 163 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698