| 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/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 11 matching lines...) Expand all Loading... |
| 22 #include "net/url_request/url_fetcher.h" | 22 #include "net/url_request/url_fetcher.h" |
| 23 #include "net/url_request/url_request_context_getter.h" | 23 #include "net/url_request/url_request_context_getter.h" |
| 24 #include "net/url_request/url_request_status.h" | 24 #include "net/url_request/url_request_status.h" |
| 25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
| 26 | 26 |
| 27 namespace chromeos { | 27 namespace chromeos { |
| 28 | 28 |
| 29 TermsOfServiceScreen::TermsOfServiceScreen( | 29 TermsOfServiceScreen::TermsOfServiceScreen( |
| 30 BaseScreenDelegate* base_screen_delegate, | 30 BaseScreenDelegate* base_screen_delegate, |
| 31 TermsOfServiceScreenActor* actor) | 31 TermsOfServiceScreenActor* actor) |
| 32 : BaseScreen(base_screen_delegate, | 32 : BaseScreen(base_screen_delegate, OobeScreen::SCREEN_TERMS_OF_SERVICE), |
| 33 WizardController::kTermsOfServiceScreenName), | |
| 34 actor_(actor) { | 33 actor_(actor) { |
| 35 DCHECK(actor_); | 34 DCHECK(actor_); |
| 36 if (actor_) | 35 if (actor_) |
| 37 actor_->SetDelegate(this); | 36 actor_->SetDelegate(this); |
| 38 } | 37 } |
| 39 | 38 |
| 40 TermsOfServiceScreen::~TermsOfServiceScreen() { | 39 TermsOfServiceScreen::~TermsOfServiceScreen() { |
| 41 if (actor_) | 40 if (actor_) |
| 42 actor_->SetDelegate(NULL); | 41 actor_->SetDelegate(NULL); |
| 43 } | 42 } |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 !source->GetResponseAsString(&terms_of_service)) { | 138 !source->GetResponseAsString(&terms_of_service)) { |
| 140 actor_->OnLoadError(); | 139 actor_->OnLoadError(); |
| 141 } else { | 140 } else { |
| 142 // 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 |
| 143 // user. | 142 // user. |
| 144 actor_->OnLoadSuccess(terms_of_service); | 143 actor_->OnLoadSuccess(terms_of_service); |
| 145 } | 144 } |
| 146 } | 145 } |
| 147 | 146 |
| 148 } // namespace chromeos | 147 } // namespace chromeos |
| OLD | NEW |