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 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/chromeos/login/screens/screen_observer.h" | 14 #include "chrome/browser/chromeos/login/screens/screen_observer.h" |
15 #include "chrome/browser/chromeos/login/wizard_controller.h" | 15 #include "chrome/browser/chromeos/login/wizard_controller.h" |
16 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 16 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
19 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
20 #include "net/http/http_response_headers.h" | 20 #include "net/http/http_response_headers.h" |
21 #include "net/url_request/url_fetcher.h" | 21 #include "net/url_request/url_fetcher.h" |
22 #include "net/url_request/url_request_context_getter.h" | 22 #include "net/url_request/url_request_context_getter.h" |
23 #include "net/url_request/url_request_status.h" | 23 #include "net/url_request/url_request_status.h" |
24 #include "url/gurl.h" | 24 #include "url/gurl.h" |
25 | 25 |
26 namespace chromeos { | 26 namespace chromeos { |
27 | 27 |
28 TermsOfServiceScreen::TermsOfServiceScreen(ScreenObserver* screen_observer, | 28 TermsOfServiceScreen::TermsOfServiceScreen(ScreenObserver* screen_observer, |
29 TermsOfServiceScreenActor* actor) | 29 TermsOfServiceScreenActor* actor) |
30 : WizardScreen(screen_observer), | 30 : BaseScreen(screen_observer), actor_(actor) { |
31 actor_(actor) { | |
32 DCHECK(actor_); | 31 DCHECK(actor_); |
33 if (actor_) | 32 if (actor_) |
34 actor_->SetDelegate(this); | 33 actor_->SetDelegate(this); |
35 } | 34 } |
36 | 35 |
37 TermsOfServiceScreen::~TermsOfServiceScreen() { | 36 TermsOfServiceScreen::~TermsOfServiceScreen() { |
38 if (actor_) | 37 if (actor_) |
39 actor_->SetDelegate(NULL); | 38 actor_->SetDelegate(NULL); |
40 } | 39 } |
41 | 40 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 !source->GetResponseAsString(&terms_of_service)) { | 141 !source->GetResponseAsString(&terms_of_service)) { |
143 actor_->OnLoadError(); | 142 actor_->OnLoadError(); |
144 } else { | 143 } else { |
145 // If the Terms of Service were downloaded successfully, show them to the | 144 // If the Terms of Service were downloaded successfully, show them to the |
146 // user. | 145 // user. |
147 actor_->OnLoadSuccess(terms_of_service); | 146 actor_->OnLoadSuccess(terms_of_service); |
148 } | 147 } |
149 } | 148 } |
150 | 149 |
151 } // namespace chromeos | 150 } // namespace chromeos |
OLD | NEW |