Chromium Code Reviews| 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 #ifndef COMPONENTS_BROWSING_DATA_UI_HISTORY_NOTICE_UTILS_H_ | 5 #ifndef COMPONENTS_BROWSING_DATA_UI_HISTORY_NOTICE_UTILS_H_ |
| 6 #define COMPONENTS_BROWSING_DATA_UI_HISTORY_NOTICE_UTILS_H_ | 6 #define COMPONENTS_BROWSING_DATA_UI_HISTORY_NOTICE_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | |
| 9 | |
| 8 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 9 | 11 |
| 10 class ProfileSyncService; | 12 class ProfileSyncService; |
| 11 | 13 |
| 12 namespace history { | 14 namespace history { |
| 13 class WebHistoryService; | 15 class WebHistoryService; |
| 14 } | 16 } |
| 15 | 17 |
| 18 namespace version_info { | |
| 19 enum class Channel; | |
| 20 } | |
| 21 | |
| 16 namespace browsing_data_ui { | 22 namespace browsing_data_ui { |
| 17 | 23 |
| 18 namespace testing { | 24 namespace testing { |
| 19 | 25 |
| 20 // TODO(crbug.com/595332): A boolean flag indicating that | 26 // TODO(crbug.com/595332): A boolean flag indicating that |
| 21 // ShouldShowNoticeAboutOtherFormsOfBrowsingHistory() should skip the query | 27 // ShouldShowNoticeAboutOtherFormsOfBrowsingHistory() should skip the query |
| 22 // for other forms of browsing history and just assume some such forms were | 28 // for other forms of browsing history and just assume some such forms were |
| 23 // found. Used only for testing. The default is false. | 29 // found. Used only for testing. The default is false. |
| 24 extern bool g_override_other_forms_of_browsing_history_query; | 30 extern bool g_override_other_forms_of_browsing_history_query; |
| 25 | 31 |
| 26 } | 32 } // testing |
| 27 | 33 |
| 28 // Whether the Clear Browsing Data UI should show a notice about the existence | 34 // Whether the Clear Browsing Data UI should show a notice about the existence |
| 29 // of other forms of browsing history stored in user's account. The response | 35 // of other forms of browsing history stored in user's account. The response |
| 30 // is returned in a |callback|. | 36 // is returned in a |callback|. |
| 31 void ShouldShowNoticeAboutOtherFormsOfBrowsingHistory( | 37 void ShouldShowNoticeAboutOtherFormsOfBrowsingHistory( |
| 32 const ProfileSyncService* sync_service, | 38 const ProfileSyncService* sync_service, |
| 33 history::WebHistoryService* history_service, | 39 history::WebHistoryService* history_service, |
| 34 base::Callback<void(bool)> callback); | 40 base::Callback<void(bool)> callback); |
| 35 | 41 |
| 36 // Whether the Clear Browsing Data UI should popup a dialog with information | 42 // Whether the Clear Browsing Data UI should popup a dialog with information |
| 37 // about the existence of other forms of browsing history stored in user's | 43 // about the existence of other forms of browsing history stored in user's |
| 38 // account when the user deletes their browsing history for the first time. | 44 // account when the user deletes their browsing history for the first time. |
| 39 // The response is returned in a |callback|. | 45 // The response is returned in a |callback|. The |channel| and |user_agent| |
| 46 // must be provided for successful communication with the Sync server, but | |
| 47 // the result does not depend from them. | |
| 40 void ShouldPopupDialogAboutOtherFormsOfBrowsingHistory( | 48 void ShouldPopupDialogAboutOtherFormsOfBrowsingHistory( |
| 41 const ProfileSyncService* sync_service, | 49 const ProfileSyncService* sync_service, |
| 42 history::WebHistoryService* history_service, | 50 history::WebHistoryService* history_service, |
| 51 const version_info::Channel channel, | |
|
msarda
2016/05/18 08:58:07
Is this missing a reference: const version_info::
sdefresne
2016/05/18 14:29:41
no version_info::Channel is an enum value, no need
msarda
2016/05/18 14:32:54
Do we need the const then?
msramek
2016/05/18 19:38:37
Correct, this is an extra const, it's not needed.
| |
| 52 const std::string& user_agent, | |
| 43 base::Callback<void(bool)> callback); | 53 base::Callback<void(bool)> callback); |
| 44 | 54 |
| 45 } // namespace browsing_data_ui | 55 } // namespace browsing_data_ui |
| 46 | 56 |
| 47 #endif // COMPONENTS_BROWSING_DATA_UI_HISTORY_NOTICE_UTILS_H_ | 57 #endif // COMPONENTS_BROWSING_DATA_UI_HISTORY_NOTICE_UTILS_H_ |
| OLD | NEW |