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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler.cc

Issue 2429033003: cros: Cleanup lock screen and OOBE C++ backing code. (Closed)
Patch Set: Address comments Created 4 years, 2 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
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc ('k') | 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 (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 <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 locale_util::LanguageSwitchResult& result) { 140 const locale_util::LanguageSwitchResult& result) {
141 // Update the screen contents to the new locale. 141 // Update the screen contents to the new locale.
142 base::DictionaryValue localized_strings; 142 base::DictionaryValue localized_strings;
143 static_cast<OobeUI*>(web_ui()->GetController()) 143 GetOobeUI()->GetLocalizedStrings(&localized_strings);
144 ->GetLocalizedStrings(&localized_strings);
145 core_oobe_actor_->ReloadContent(localized_strings); 144 core_oobe_actor_->ReloadContent(localized_strings);
146 145
147 DoShow(); 146 DoShow();
148 } 147 }
149 148
150 void TermsOfServiceScreenHandler::DoShow() { 149 void TermsOfServiceScreenHandler::DoShow() {
151 // Determine the user's most preferred input method. 150 // Determine the user's most preferred input method.
152 std::vector<std::string> input_methods = base::SplitString( 151 std::vector<std::string> input_methods = base::SplitString(
153 ProfileHelper::Get() 152 ProfileHelper::Get()
154 ->GetProfileByUserUnsafe( 153 ->GetProfileByUserUnsafe(
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // and continue" button should not be accessible. If the user managed to 207 // and continue" button should not be accessible. If the user managed to
209 // activate it somehow anway, do not treat this as acceptance of the Terms 208 // activate it somehow anway, do not treat this as acceptance of the Terms
210 // and Conditions and end the session instead, as if the user had declined. 209 // and Conditions and end the session instead, as if the user had declined.
211 if (terms_of_service_.empty()) 210 if (terms_of_service_.empty())
212 screen_->OnDecline(); 211 screen_->OnDecline();
213 else 212 else
214 screen_->OnAccept(); 213 screen_->OnAccept();
215 } 214 }
216 215
217 } // namespace chromeos 216 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698