| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |