| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/registration_screen.h" | 5 #include "chrome/browser/chromeos/login/registration_screen.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/child_process_security_policy.h" | 10 #include "chrome/browser/child_process_security_policy.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 /////////////////////////////////////////////////////////////////////////////// | 100 /////////////////////////////////////////////////////////////////////////////// |
| 101 // RegistrationScreen, TabContentsDelegate implementation: | 101 // RegistrationScreen, TabContentsDelegate implementation: |
| 102 void RegistrationScreen::OpenURLFromTab(TabContents* source, | 102 void RegistrationScreen::OpenURLFromTab(TabContents* source, |
| 103 const GURL& url, | 103 const GURL& url, |
| 104 const GURL& referrer, | 104 const GURL& referrer, |
| 105 WindowOpenDisposition disposition, | 105 WindowOpenDisposition disposition, |
| 106 PageTransition::Type transition) { | 106 PageTransition::Type transition) { |
| 107 if (url.spec() == kRegistrationSuccessUrl) { | 107 if (url.spec() == kRegistrationSuccessUrl) { |
| 108 source->Stop(); | 108 source->Stop(); |
| 109 LOG(INFO) << "Registration form completed."; |
| 109 CloseScreen(ScreenObserver::REGISTRATION_SUCCESS); | 110 CloseScreen(ScreenObserver::REGISTRATION_SUCCESS); |
| 110 } else if (url.spec() == kRegistrationSkippedUrl) { | 111 } else if (url.spec() == kRegistrationSkippedUrl) { |
| 111 source->Stop(); | 112 source->Stop(); |
| 113 LOG(INFO) << "Registration form skipped."; |
| 112 CloseScreen(ScreenObserver::REGISTRATION_SKIPPED); | 114 CloseScreen(ScreenObserver::REGISTRATION_SKIPPED); |
| 113 } else { | 115 } else { |
| 114 source->Stop(); | 116 source->Stop(); |
| 115 // Host registration page and actual registration page hosted by | 117 // Host registration page and actual registration page hosted by |
| 116 // OEM partner doesn't contain links to external URLs. | 118 // OEM partner doesn't contain links to external URLs. |
| 117 LOG(WARNING) << "Navigate to unsupported url: " << url.spec(); | 119 LOG(WARNING) << "Navigate to unsupported url: " << url.spec(); |
| 118 } | 120 } |
| 119 } | 121 } |
| 120 | 122 |
| 121 /////////////////////////////////////////////////////////////////////////////// | 123 /////////////////////////////////////////////////////////////////////////////// |
| (...skipping 11 matching lines...) Expand all Loading... |
| 133 } | 135 } |
| 134 | 136 |
| 135 // static | 137 // static |
| 136 URLRequestJob* RegistrationScreen::Factory(URLRequest* request, | 138 URLRequestJob* RegistrationScreen::Factory(URLRequest* request, |
| 137 const std::string& scheme) { | 139 const std::string& scheme) { |
| 138 LOG(INFO) << "Handling url: " << request->url().spec().c_str(); | 140 LOG(INFO) << "Handling url: " << request->url().spec().c_str(); |
| 139 return new URLRequestAboutJob(request); | 141 return new URLRequestAboutJob(request); |
| 140 } | 142 } |
| 141 | 143 |
| 142 } // namespace chromeos | 144 } // namespace chromeos |
| OLD | NEW |