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

Side by Side Diff: chrome/browser/search/hotword_audio_history_handler.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 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/search/hotword_audio_history_handler.h" 5 #include "chrome/browser/search/hotword_audio_history_handler.h"
6 6
7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/extensions/api/hotword_private/hotword_private_api.h" 7 #include "chrome/browser/extensions/api/hotword_private/hotword_private_api.h"
9 #include "chrome/browser/history/web_history_service_factory.h" 8 #include "chrome/browser/history/web_history_service_factory.h"
10 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
12 #include "components/history/core/browser/web_history_service.h" 11 #include "components/history/core/browser/web_history_service.h"
12 #include "components/prefs/pref_service.h"
13 13
14 using extensions::BrowserContextKeyedAPIFactory; 14 using extensions::BrowserContextKeyedAPIFactory;
15 using extensions::HotwordPrivateEventService; 15 using extensions::HotwordPrivateEventService;
16 16
17 // Max number of hours between audio history checks. 17 // Max number of hours between audio history checks.
18 static const int kHoursUntilNextAudioHistoryCheck = 24; 18 static const int kHoursUntilNextAudioHistoryCheck = 24;
19 19
20 HotwordAudioHistoryHandler::HotwordAudioHistoryHandler( 20 HotwordAudioHistoryHandler::HotwordAudioHistoryHandler(
21 content::BrowserContext* context, 21 content::BrowserContext* context,
22 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) 22 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 callback.Run(success, value); 113 callback.Run(success, value);
114 } 114 }
115 115
116 void HotwordAudioHistoryHandler::SetAudioHistoryComplete( 116 void HotwordAudioHistoryHandler::SetAudioHistoryComplete(
117 bool new_enabled_value, 117 bool new_enabled_value,
118 const HotwordAudioHistoryCallback& callback, 118 const HotwordAudioHistoryCallback& callback,
119 bool success, bool callback_enabled_value) { 119 bool success, bool callback_enabled_value) {
120 UpdateLocalPreference(success, new_enabled_value); 120 UpdateLocalPreference(success, new_enabled_value);
121 callback.Run(success, new_enabled_value); 121 callback.Run(success, new_enabled_value);
122 } 122 }
OLDNEW
« no previous file with comments | « chrome/browser/search/hotword_audio_history_handler.h ('k') | chrome/browser/search/hotword_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698