| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/auto_login_infobar_delegate.h" | 5 #include "chrome/browser/ui/auto_login_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 const GoogleServiceAuthError& error) { | 111 const GoogleServiceAuthError& error) { |
| 112 LOG(WARNING) << "AutoLoginRedirector: token request failed"; | 112 LOG(WARNING) << "AutoLoginRedirector: token request failed"; |
| 113 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 113 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void AutoLoginRedirector::RedirectToMergeSession(const std::string& token) { | 116 void AutoLoginRedirector::RedirectToMergeSession(const std::string& token) { |
| 117 // TODO(rogerta): what is the correct page transition? | 117 // TODO(rogerta): what is the correct page transition? |
| 118 web_contents()->GetController().LoadURL( | 118 web_contents()->GetController().LoadURL( |
| 119 GaiaUrls::GetInstance()->merge_session_url().Resolve( | 119 GaiaUrls::GetInstance()->merge_session_url().Resolve( |
| 120 "?source=chrome&uberauth=" + token + "&" + args_), | 120 "?source=chrome&uberauth=" + token + "&" + args_), |
| 121 content::Referrer(), content::PAGE_TRANSITION_AUTO_BOOKMARK, | 121 content::Referrer(), ui::PAGE_TRANSITION_AUTO_BOOKMARK, |
| 122 std::string()); | 122 std::string()); |
| 123 } | 123 } |
| 124 | 124 |
| 125 } // namespace | 125 } // namespace |
| 126 | 126 |
| 127 | 127 |
| 128 // AutoLoginInfoBarDelegate --------------------------------------------------- | 128 // AutoLoginInfoBarDelegate --------------------------------------------------- |
| 129 | 129 |
| 130 // static | 130 // static |
| 131 bool AutoLoginInfoBarDelegate::Create(content::WebContents* web_contents, | 131 bool AutoLoginInfoBarDelegate::Create(content::WebContents* web_contents, |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 RecordHistogramAction(REJECTED); | 230 RecordHistogramAction(REJECTED); |
| 231 button_pressed_ = true; | 231 button_pressed_ = true; |
| 232 return true; | 232 return true; |
| 233 } | 233 } |
| 234 | 234 |
| 235 void AutoLoginInfoBarDelegate::GoogleSignedOut( | 235 void AutoLoginInfoBarDelegate::GoogleSignedOut( |
| 236 const std::string& account_id, | 236 const std::string& account_id, |
| 237 const std::string& username) { | 237 const std::string& username) { |
| 238 infobar()->RemoveSelf(); | 238 infobar()->RemoveSelf(); |
| 239 } | 239 } |
| OLD | NEW |