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

Side by Side Diff: chrome/browser/search/hotword_service.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 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/search/hotword_service.h" 5 #include "chrome/browser/search/hotword_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 hotword_audio_verification_launch_mode_ = launch_mode; 703 hotword_audio_verification_launch_mode_ = launch_mode;
704 704
705 ExtensionService* extension_service = GetExtensionService(profile_); 705 ExtensionService* extension_service = GetExtensionService(profile_);
706 if (!extension_service) 706 if (!extension_service)
707 return; 707 return;
708 const extensions::Extension* extension = extension_service->GetExtensionById( 708 const extensions::Extension* extension = extension_service->GetExtensionById(
709 extension_misc::kHotwordAudioVerificationAppId, true); 709 extension_misc::kHotwordAudioVerificationAppId, true);
710 if (!extension) 710 if (!extension)
711 return; 711 return;
712 712
713 OpenApplication( 713 OpenApplication(AppLaunchParams(
714 AppLaunchParams(profile_, extension, extensions::LAUNCH_CONTAINER_WINDOW, 714 profile_, extension, extensions::LAUNCH_CONTAINER_WINDOW,
715 NEW_WINDOW, extensions::SOURCE_CHROME_INTERNAL)); 715 WindowOpenDisposition::NEW_WINDOW, extensions::SOURCE_CHROME_INTERNAL));
716 } 716 }
717 717
718 HotwordService::LaunchMode 718 HotwordService::LaunchMode
719 HotwordService::GetHotwordAudioVerificationLaunchMode() { 719 HotwordService::GetHotwordAudioVerificationLaunchMode() {
720 return hotword_audio_verification_launch_mode_; 720 return hotword_audio_verification_launch_mode_;
721 } 721 }
722 722
723 void HotwordService::StartTraining() { 723 void HotwordService::StartTraining() {
724 training_ = true; 724 training_ = true;
725 725
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 // Only support multiple profiles and profile switching in ChromeOS. 874 // Only support multiple profiles and profile switching in ChromeOS.
875 if (user_manager::UserManager::IsInitialized()) { 875 if (user_manager::UserManager::IsInitialized()) {
876 user_manager::User* user = 876 user_manager::User* user =
877 user_manager::UserManager::Get()->GetActiveUser(); 877 user_manager::UserManager::Get()->GetActiveUser();
878 if (user && user->is_profile_created()) 878 if (user && user->is_profile_created())
879 return profile_ == ProfileManager::GetActiveUserProfile(); 879 return profile_ == ProfileManager::GetActiveUserProfile();
880 } 880 }
881 #endif 881 #endif
882 return true; 882 return true;
883 } 883 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/srt_global_error_win.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698