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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 686333002: Hotword Private API: Adds speech training functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 DCHECK(success); 1663 DCHECK(success);
1664 HotwordService::LaunchMode launch_mode = 1664 HotwordService::LaunchMode launch_mode =
1665 HotwordService::HOTWORD_AND_AUDIO_HISTORY; 1665 HotwordService::HOTWORD_AND_AUDIO_HISTORY;
1666 1666
1667 if (retrain) { 1667 if (retrain) {
1668 DCHECK(profile->GetPrefs()->GetBoolean( 1668 DCHECK(profile->GetPrefs()->GetBoolean(
1669 prefs::kHotwordAlwaysOnSearchEnabled)); 1669 prefs::kHotwordAlwaysOnSearchEnabled));
1670 DCHECK(profile->GetPrefs()->GetBoolean( 1670 DCHECK(profile->GetPrefs()->GetBoolean(
1671 prefs::kHotwordAudioLoggingEnabled)); 1671 prefs::kHotwordAudioLoggingEnabled));
1672 1672
1673 launch_mode = HotwordService::SPEECH_TRAINING; 1673 launch_mode = HotwordService::RETRAIN;
1674 } else if (profile->GetPrefs()->GetBoolean( 1674 } else if (profile->GetPrefs()->GetBoolean(
1675 prefs::kHotwordAudioLoggingEnabled)) { 1675 prefs::kHotwordAudioLoggingEnabled)) {
1676 DCHECK(!profile->GetPrefs()->GetBoolean( 1676 DCHECK(!profile->GetPrefs()->GetBoolean(
1677 prefs::kHotwordAlwaysOnSearchEnabled)); 1677 prefs::kHotwordAlwaysOnSearchEnabled));
1678 1678
1679 // TODO(kcarattini): Make sure the Chrome Audio Logging pref is synced 1679 // TODO(kcarattini): Make sure the Chrome Audio Logging pref is synced
1680 // to the account-level Audio History setting from footprints. 1680 // to the account-level Audio History setting from footprints.
1681 launch_mode = HotwordService::HOTWORD_ONLY; 1681 launch_mode = HotwordService::HOTWORD_ONLY;
1682 } else { 1682 } else {
1683 DCHECK(!profile->GetPrefs()->GetBoolean( 1683 DCHECK(!profile->GetPrefs()->GetBoolean(
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1985 1985
1986 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked, 1986 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked,
1987 bool disabled) { 1987 bool disabled) {
1988 web_ui()->CallJavascriptFunction( 1988 web_ui()->CallJavascriptFunction(
1989 "BrowserOptions.setMetricsReportingCheckboxState", 1989 "BrowserOptions.setMetricsReportingCheckboxState",
1990 base::FundamentalValue(checked), 1990 base::FundamentalValue(checked),
1991 base::FundamentalValue(disabled)); 1991 base::FundamentalValue(disabled));
1992 } 1992 }
1993 1993
1994 } // namespace options 1994 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/common/extensions/api/hotword_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698