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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 } | 130 } |
131 | 131 |
132 void TermsOfServiceScreenHandler::Initialize() { | 132 void TermsOfServiceScreenHandler::Initialize() { |
133 if (show_on_init_) { | 133 if (show_on_init_) { |
134 Show(); | 134 Show(); |
135 show_on_init_ = false; | 135 show_on_init_ = false; |
136 } | 136 } |
137 } | 137 } |
138 | 138 |
139 void TermsOfServiceScreenHandler::OnLanguageChangedCallback( | 139 void TermsOfServiceScreenHandler::OnLanguageChangedCallback( |
140 const std::string& requested_locale, | 140 scoped_ptr<locale_util::LanguageSwitchResult> result) { |
141 const std::string& loaded_locale, | |
142 const bool success) { | |
143 // Update the screen contents to the new locale. | 141 // Update the screen contents to the new locale. |
144 base::DictionaryValue localized_strings; | 142 base::DictionaryValue localized_strings; |
145 static_cast<OobeUI*>(web_ui()->GetController()) | 143 static_cast<OobeUI*>(web_ui()->GetController()) |
146 ->GetLocalizedStrings(&localized_strings); | 144 ->GetLocalizedStrings(&localized_strings); |
147 core_oobe_actor_->ReloadContent(localized_strings); | 145 core_oobe_actor_->ReloadContent(localized_strings); |
148 | 146 |
149 DoShow(); | 147 DoShow(); |
150 } | 148 } |
151 | 149 |
152 void TermsOfServiceScreenHandler::DoShow() { | 150 void TermsOfServiceScreenHandler::DoShow() { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // 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 |
213 // 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 |
214 // 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. |
215 if (terms_of_service_.empty()) | 213 if (terms_of_service_.empty()) |
216 screen_->OnDecline(); | 214 screen_->OnDecline(); |
217 else | 215 else |
218 screen_->OnAccept(); | 216 screen_->OnAccept(); |
219 } | 217 } |
220 | 218 |
221 } // namespace chromeos | 219 } // namespace chromeos |
OLD | NEW |