| 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/supervised_user/supervised_user_navigation_observer.h" | 5 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ptr_util.h" |
| 9 #include "chrome/browser/history/history_service_factory.h" | 10 #include "chrome/browser/history/history_service_factory.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/supervised_user/supervised_user_interstitial.h" | 12 #include "chrome/browser/supervised_user/supervised_user_interstitial.h" |
| 12 #include "chrome/browser/supervised_user/supervised_user_service.h" | 13 #include "chrome/browser/supervised_user/supervised_user_service.h" |
| 13 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 14 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
| 14 #include "chrome/browser/tab_contents/tab_util.h" | 15 #include "chrome/browser/tab_contents/tab_util.h" |
| 15 #include "components/history/content/browser/history_context_helper.h" | 16 #include "components/history/content/browser/history_context_helper.h" |
| 16 #include "components/history/core/browser/history_service.h" | 17 #include "components/history/core/browser/history_service.h" |
| 17 #include "components/history/core/browser/history_types.h" | 18 #include "components/history/core/browser/history_types.h" |
| 18 #include "components/sessions/content/content_serialized_navigation_builder.h" | 19 #include "components/sessions/content/content_serialized_navigation_builder.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 if (url != web_contents()->GetLastCommittedURL()) | 129 if (url != web_contents()->GetLastCommittedURL()) |
| 129 return; | 130 return; |
| 130 | 131 |
| 131 const bool initial_page_load = false; | 132 const bool initial_page_load = false; |
| 132 if (behavior == SupervisedUserURLFilter::FilteringBehavior::BLOCK) { | 133 if (behavior == SupervisedUserURLFilter::FilteringBehavior::BLOCK) { |
| 133 SupervisedUserInterstitial::Show(web_contents(), url, reason, | 134 SupervisedUserInterstitial::Show(web_contents(), url, reason, |
| 134 initial_page_load, | 135 initial_page_load, |
| 135 base::Callback<void(bool)>()); | 136 base::Callback<void(bool)>()); |
| 136 } | 137 } |
| 137 } | 138 } |
| OLD | NEW |