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

Side by Side Diff: chrome/browser/chromeos/login/screens/terms_of_service_screen.cc

Issue 2705363002: cros: Move BaseScreenDelegate::ExitCodes into separate file, ScreenExitCode. (Closed)
Patch Set: Rebase Created 3 years, 9 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/chromeos/login/screens/terms_of_service_screen.h" 5 #include "chrome/browser/chromeos/login/screens/terms_of_service_screen.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Start downloading the Terms of Service. 56 // Start downloading the Terms of Service.
57 StartDownload(); 57 StartDownload();
58 } 58 }
59 59
60 void TermsOfServiceScreen::Hide() { 60 void TermsOfServiceScreen::Hide() {
61 if (view_) 61 if (view_)
62 view_->Hide(); 62 view_->Hide();
63 } 63 }
64 64
65 void TermsOfServiceScreen::OnDecline() { 65 void TermsOfServiceScreen::OnDecline() {
66 Finish(BaseScreenDelegate::TERMS_OF_SERVICE_DECLINED); 66 Finish(ScreenExitCode::TERMS_OF_SERVICE_DECLINED);
67 } 67 }
68 68
69 void TermsOfServiceScreen::OnAccept() { 69 void TermsOfServiceScreen::OnAccept() {
70 Finish(BaseScreenDelegate::TERMS_OF_SERVICE_ACCEPTED); 70 Finish(ScreenExitCode::TERMS_OF_SERVICE_ACCEPTED);
71 } 71 }
72 72
73 void TermsOfServiceScreen::OnViewDestroyed(TermsOfServiceScreenView* view) { 73 void TermsOfServiceScreen::OnViewDestroyed(TermsOfServiceScreenView* view) {
74 if (view_ == view) 74 if (view_ == view)
75 view_ = NULL; 75 view_ = NULL;
76 } 76 }
77 77
78 void TermsOfServiceScreen::StartDownload() { 78 void TermsOfServiceScreen::StartDownload() {
79 const PrefService* prefs = ProfileManager::GetActiveUserProfile()->GetPrefs(); 79 const PrefService* prefs = ProfileManager::GetActiveUserProfile()->GetPrefs();
80 // If an URL from which the Terms of Service can be downloaded has not been 80 // If an URL from which the Terms of Service can be downloaded has not been
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 !source->GetResponseAsString(&terms_of_service)) { 138 !source->GetResponseAsString(&terms_of_service)) {
139 view_->OnLoadError(); 139 view_->OnLoadError();
140 } else { 140 } else {
141 // If the Terms of Service were downloaded successfully, show them to the 141 // If the Terms of Service were downloaded successfully, show them to the
142 // user. 142 // user.
143 view_->OnLoadSuccess(terms_of_service); 143 view_->OnLoadSuccess(terms_of_service);
144 } 144 }
145 } 145 }
146 146
147 } // namespace chromeos 147 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/screen_exit_code.cc ('k') | chrome/browser/chromeos/login/screens/update_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698