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

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

Issue 620563002: ChromeOS NetworkScreenHandler should not call CheckAndResolveLocale on UI thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 6 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
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 <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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698