| 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/webstore_inline_installer.h" | 5 #include "chrome/browser/extensions/webstore_inline_installer.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 return IsRequestorPermitted(webstore_data, requestor_url_, error); | 226 return IsRequestorPermitted(webstore_data, requestor_url_, error); |
| 227 } | 227 } |
| 228 | 228 |
| 229 // | 229 // |
| 230 // Private implementation. | 230 // Private implementation. |
| 231 // | 231 // |
| 232 | 232 |
| 233 void WebstoreInlineInstaller::DidFinishNavigation( | 233 void WebstoreInlineInstaller::DidFinishNavigation( |
| 234 content::NavigationHandle* navigation_handle) { | 234 content::NavigationHandle* navigation_handle) { |
| 235 if (navigation_handle->HasCommitted() && | 235 if (navigation_handle->HasCommitted() && |
| 236 !navigation_handle->IsSamePage() && | 236 !navigation_handle->IsSameDocument() && |
| 237 (navigation_handle->GetRenderFrameHost() == host_ || | 237 (navigation_handle->GetRenderFrameHost() == host_ || |
| 238 navigation_handle->IsInMainFrame())) { | 238 navigation_handle->IsInMainFrame())) { |
| 239 host_ = nullptr; | 239 host_ = nullptr; |
| 240 } | 240 } |
| 241 } | 241 } |
| 242 | 242 |
| 243 void WebstoreInlineInstaller::WebContentsDestroyed() { | 243 void WebstoreInlineInstaller::WebContentsDestroyed() { |
| 244 AbortInstall(); | 244 AbortInstall(); |
| 245 } | 245 } |
| 246 | 246 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 DLOG(WARNING) << "Could not parse " << verified_site_pattern_spec << | 288 DLOG(WARNING) << "Could not parse " << verified_site_pattern_spec << |
| 289 " as URL pattern " << parse_result; | 289 " as URL pattern " << parse_result; |
| 290 return false; | 290 return false; |
| 291 } | 291 } |
| 292 verified_site_pattern.SetScheme("*"); | 292 verified_site_pattern.SetScheme("*"); |
| 293 | 293 |
| 294 return verified_site_pattern.MatchesURL(requestor_url); | 294 return verified_site_pattern.MatchesURL(requestor_url); |
| 295 } | 295 } |
| 296 | 296 |
| 297 } // namespace extensions | 297 } // namespace extensions |
| OLD | NEW |