OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/attestation/platform_verification_dialog.h" | 5 #include "chrome/browser/chromeos/attestation/platform_verification_dialog.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 profile, learn_more_url, ui::PAGE_TRANSITION_LINK); | 145 profile, learn_more_url, ui::PAGE_TRANSITION_LINK); |
146 params.disposition = WindowOpenDisposition::SINGLETON_TAB; | 146 params.disposition = WindowOpenDisposition::SINGLETON_TAB; |
147 chrome::Navigate(¶ms); | 147 chrome::Navigate(¶ms); |
148 } else { | 148 } else { |
149 chrome::ShowSingletonTab(browser, learn_more_url); | 149 chrome::ShowSingletonTab(browser, learn_more_url); |
150 } | 150 } |
151 } | 151 } |
152 | 152 |
153 void PlatformVerificationDialog::DidStartNavigation( | 153 void PlatformVerificationDialog::DidStartNavigation( |
154 content::NavigationHandle* navigation_handle) { | 154 content::NavigationHandle* navigation_handle) { |
155 if (!navigation_handle->IsInMainFrame() || navigation_handle->IsSamePage()) | 155 if (!navigation_handle->IsInMainFrame() || |
| 156 navigation_handle->IsSameDocument()) |
156 return; | 157 return; |
157 | 158 |
158 views::Widget* widget = GetWidget(); | 159 views::Widget* widget = GetWidget(); |
159 if (widget) | 160 if (widget) |
160 widget->Close(); | 161 widget->Close(); |
161 } | 162 } |
162 | 163 |
163 } // namespace attestation | 164 } // namespace attestation |
164 } // namespace chromeos | 165 } // namespace chromeos |
OLD | NEW |