| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/browsing_data_ui/history_notice_utils.h" | 5 #include "components/browsing_data_ui/history_notice_utils.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/location.h" | 9 #include "base/location.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // after processing both callbacks. | 105 // after processing both callbacks. |
| 106 MergeBooleanCallbacks* merger = new MergeBooleanCallbacks(2, callback); | 106 MergeBooleanCallbacks* merger = new MergeBooleanCallbacks(2, callback); |
| 107 history_service->QueryWebAndAppActivity(base::Bind( | 107 history_service->QueryWebAndAppActivity(base::Bind( |
| 108 &MergeBooleanCallbacks::RunCallback, base::Unretained(merger))); | 108 &MergeBooleanCallbacks::RunCallback, base::Unretained(merger))); |
| 109 history_service->QueryOtherFormsOfBrowsingHistory( | 109 history_service->QueryOtherFormsOfBrowsingHistory( |
| 110 channel, | 110 channel, |
| 111 base::Bind( | 111 base::Bind( |
| 112 &MergeBooleanCallbacks::RunCallback, base::Unretained(merger))); | 112 &MergeBooleanCallbacks::RunCallback, base::Unretained(merger))); |
| 113 } | 113 } |
| 114 | 114 |
| 115 // TODO(crbug.com/614319): This function is deprecated and should be removed. | |
| 116 void ShouldPopupDialogAboutOtherFormsOfBrowsingHistory( | |
| 117 const sync_driver::SyncService* sync_service, | |
| 118 history::WebHistoryService* history_service, | |
| 119 base::Callback<void(bool)> callback) { | |
| 120 if (!history_service || | |
| 121 !testing::g_override_other_forms_of_browsing_history_query) { | |
| 122 callback.Run(false); | |
| 123 return; | |
| 124 } | |
| 125 | |
| 126 ShouldShowNoticeAboutOtherFormsOfBrowsingHistory( | |
| 127 sync_service, history_service, callback); | |
| 128 } | |
| 129 | |
| 130 } // namespace browsing_data_ui | 115 } // namespace browsing_data_ui |
| OLD | NEW |