OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/webui/chromeos/login/terms_of_service_screen_handler
.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler
.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 return; | 98 return; |
99 } | 99 } |
100 | 100 |
101 // Switch to the user's UI locale before showing the screen. | 101 // Switch to the user's UI locale before showing the screen. |
102 locale_util::SwitchLanguageCallback callback( | 102 locale_util::SwitchLanguageCallback callback( |
103 base::Bind(&TermsOfServiceScreenHandler::OnLanguageChangedCallback, | 103 base::Bind(&TermsOfServiceScreenHandler::OnLanguageChangedCallback, |
104 base::Unretained(this))); | 104 base::Unretained(this))); |
105 locale_util::SwitchLanguage(locale, | 105 locale_util::SwitchLanguage(locale, |
106 true, // enable_locale_keyboard_layouts | 106 true, // enable_locale_keyboard_layouts |
107 false, // login_layouts_only | 107 false, // login_layouts_only |
108 callback); | 108 callback, ProfileManager::GetActiveUserProfile()); |
109 } | 109 } |
110 | 110 |
111 void TermsOfServiceScreenHandler::Hide() { | 111 void TermsOfServiceScreenHandler::Hide() { |
112 } | 112 } |
113 | 113 |
114 void TermsOfServiceScreenHandler::SetDomain(const std::string& domain) { | 114 void TermsOfServiceScreenHandler::SetDomain(const std::string& domain) { |
115 domain_ = domain; | 115 domain_ = domain; |
116 UpdateDomainInUI(); | 116 UpdateDomainInUI(); |
117 } | 117 } |
118 | 118 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 // and continue" button should not be accessible. If the user managed to | 210 // and continue" button should not be accessible. If the user managed to |
211 // activate it somehow anway, do not treat this as acceptance of the Terms | 211 // activate it somehow anway, do not treat this as acceptance of the Terms |
212 // and Conditions and end the session instead, as if the user had declined. | 212 // and Conditions and end the session instead, as if the user had declined. |
213 if (terms_of_service_.empty()) | 213 if (terms_of_service_.empty()) |
214 screen_->OnDecline(); | 214 screen_->OnDecline(); |
215 else | 215 else |
216 screen_->OnAccept(); | 216 screen_->OnAccept(); |
217 } | 217 } |
218 | 218 |
219 } // namespace chromeos | 219 } // namespace chromeos |
OLD | NEW |