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

Side by Side Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 804853002: Only log voice recognition in always-on hotwording mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/app_list/start_page_service.h" 5 #include "chrome/browser/ui/app_list/start_page_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 content::WebContents* StartPageService::GetSpeechContents() { 345 content::WebContents* StartPageService::GetSpeechContents() {
346 return GetSpeechRecognitionContents(); 346 return GetSpeechRecognitionContents();
347 } 347 }
348 348
349 void StartPageService::GetSpeechAuthParameters(std::string* auth_scope, 349 void StartPageService::GetSpeechAuthParameters(std::string* auth_scope,
350 std::string* auth_token) { 350 std::string* auth_token) {
351 if (HotwordService::IsExperimentalHotwordingEnabled()) { 351 if (HotwordService::IsExperimentalHotwordingEnabled()) {
352 HotwordService* service = HotwordServiceFactory::GetForProfile(profile_); 352 HotwordService* service = HotwordServiceFactory::GetForProfile(profile_);
353 if (service && 353 if (service &&
354 service->IsOptedIntoAudioLogging() && 354 service->IsOptedIntoAudioLogging() &&
355 service->IsAlwaysOnEnabled() &&
355 !speech_auth_helper_->GetToken().empty()) { 356 !speech_auth_helper_->GetToken().empty()) {
356 *auth_scope = speech_auth_helper_->GetScope(); 357 *auth_scope = speech_auth_helper_->GetScope();
357 *auth_token = speech_auth_helper_->GetToken(); 358 *auth_token = speech_auth_helper_->GetToken();
358 } 359 }
359 } 360 }
360 } 361 }
361 362
362 void StartPageService::Shutdown() { 363 void StartPageService::Shutdown() {
363 UnloadContents(); 364 UnloadContents();
364 #if defined(OS_CHROMEOS) 365 #if defined(OS_CHROMEOS)
(...skipping 27 matching lines...) Expand all
392 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 393 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
393 std::string()); 394 std::string());
394 } 395 }
395 396
396 void StartPageService::UnloadContents() { 397 void StartPageService::UnloadContents() {
397 contents_.reset(); 398 contents_.reset();
398 webui_finished_loading_ = false; 399 webui_finished_loading_ = false;
399 } 400 }
400 401
401 } // namespace app_list 402 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698