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

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: Added tests for Finalize Speaker Model 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 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 DCHECK(success); 1654 DCHECK(success);
1655 HotwordService::LaunchMode launch_mode = 1655 HotwordService::LaunchMode launch_mode =
1656 HotwordService::HOTWORD_AND_AUDIO_HISTORY; 1656 HotwordService::HOTWORD_AND_AUDIO_HISTORY;
1657 1657
1658 if (retrain) { 1658 if (retrain) {
1659 DCHECK(profile->GetPrefs()->GetBoolean( 1659 DCHECK(profile->GetPrefs()->GetBoolean(
1660 prefs::kHotwordAlwaysOnSearchEnabled)); 1660 prefs::kHotwordAlwaysOnSearchEnabled));
1661 DCHECK(profile->GetPrefs()->GetBoolean( 1661 DCHECK(profile->GetPrefs()->GetBoolean(
1662 prefs::kHotwordAudioLoggingEnabled)); 1662 prefs::kHotwordAudioLoggingEnabled));
1663 1663
1664 launch_mode = HotwordService::SPEECH_TRAINING; 1664 launch_mode = HotwordService::RETRAIN;
1665 } else if (profile->GetPrefs()->GetBoolean( 1665 } else if (profile->GetPrefs()->GetBoolean(
1666 prefs::kHotwordAudioLoggingEnabled)) { 1666 prefs::kHotwordAudioLoggingEnabled)) {
1667 DCHECK(!profile->GetPrefs()->GetBoolean( 1667 DCHECK(!profile->GetPrefs()->GetBoolean(
1668 prefs::kHotwordAlwaysOnSearchEnabled)); 1668 prefs::kHotwordAlwaysOnSearchEnabled));
1669 1669
1670 // TODO(kcarattini): Make sure the Chrome Audio Logging pref is synced 1670 // TODO(kcarattini): Make sure the Chrome Audio Logging pref is synced
1671 // to the account-level Audio History setting from footprints. 1671 // to the account-level Audio History setting from footprints.
1672 launch_mode = HotwordService::HOTWORD_ONLY; 1672 launch_mode = HotwordService::HOTWORD_ONLY;
1673 } else { 1673 } else {
1674 DCHECK(!profile->GetPrefs()->GetBoolean( 1674 DCHECK(!profile->GetPrefs()->GetBoolean(
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 1976
1977 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked, 1977 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked,
1978 bool disabled) { 1978 bool disabled) {
1979 web_ui()->CallJavascriptFunction( 1979 web_ui()->CallJavascriptFunction(
1980 "BrowserOptions.setMetricsReportingCheckboxState", 1980 "BrowserOptions.setMetricsReportingCheckboxState",
1981 base::FundamentalValue(checked), 1981 base::FundamentalValue(checked),
1982 base::FundamentalValue(disabled)); 1982 base::FundamentalValue(disabled));
1983 } 1983 }
1984 1984
1985 } // namespace options 1985 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698