OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/api/identity/web_auth_flow.h" | 5 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 bool is_error_page, | 214 bool is_error_page, |
215 bool is_iframe_srcdoc) { | 215 bool is_iframe_srcdoc) { |
216 if (!render_frame_host->GetParent()) | 216 if (!render_frame_host->GetParent()) |
217 BeforeUrlLoaded(validated_url); | 217 BeforeUrlLoaded(validated_url); |
218 } | 218 } |
219 | 219 |
220 void WebAuthFlow::DidFailProvisionalLoad( | 220 void WebAuthFlow::DidFailProvisionalLoad( |
221 content::RenderFrameHost* render_frame_host, | 221 content::RenderFrameHost* render_frame_host, |
222 const GURL& validated_url, | 222 const GURL& validated_url, |
223 int error_code, | 223 int error_code, |
224 const base::string16& error_description) { | 224 const base::string16& error_description, |
| 225 bool was_ignored_by_handler) { |
225 TRACE_EVENT_ASYNC_STEP_PAST1("identity", | 226 TRACE_EVENT_ASYNC_STEP_PAST1("identity", |
226 "WebAuthFlow", | 227 "WebAuthFlow", |
227 this, | 228 this, |
228 "DidFailProvisionalLoad", | 229 "DidFailProvisionalLoad", |
229 "error_code", | 230 "error_code", |
230 error_code); | 231 error_code); |
231 if (delegate_) | 232 if (delegate_) |
232 delegate_->OnAuthFlowFailure(LOAD_FAILED); | 233 delegate_->OnAuthFlowFailure(LOAD_FAILED); |
233 } | 234 } |
234 | 235 |
235 void WebAuthFlow::DidStopLoading() { | 236 void WebAuthFlow::DidStopLoading() { |
236 AfterUrlLoaded(); | 237 AfterUrlLoaded(); |
237 } | 238 } |
238 | 239 |
239 void WebAuthFlow::DidNavigateMainFrame( | 240 void WebAuthFlow::DidNavigateMainFrame( |
240 const content::LoadCommittedDetails& details, | 241 const content::LoadCommittedDetails& details, |
241 const content::FrameNavigateParams& params) { | 242 const content::FrameNavigateParams& params) { |
242 if (delegate_ && details.http_status_code >= 400) | 243 if (delegate_ && details.http_status_code >= 400) |
243 delegate_->OnAuthFlowFailure(LOAD_FAILED); | 244 delegate_->OnAuthFlowFailure(LOAD_FAILED); |
244 } | 245 } |
245 | 246 |
246 } // namespace extensions | 247 } // namespace extensions |
OLD | NEW |