Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable History datatype for Sync #20329

Merged
merged 15 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -854,30 +854,13 @@
kOsDesktop | kOsAndroid, \
FEATURE_VALUE_TYPE(translate::kTranslate), \
}, \
{ \
"brave-sync-history-diagnostics", \
"Enable Brave Sync History Diagnostics", \
"Brave Sync History Diagnostics flag displays additional sync " \
"related information on History page", \
kOsAll, \
FEATURE_VALUE_TYPE( \
brave_sync::features::kBraveSyncHistoryDiagnostics), \
}, \
{ \
"restrict-event-source-pool", \
"Restrict Event Source Pool", \
"Limits simultaneous active WebSockets connections per eTLD+1", \
kOsAll, \
FEATURE_VALUE_TYPE(blink::features::kRestrictEventSourcePool), \
}, \
{ \
"brave-sync-send-all-history", \
"Send All History to Brave Sync", \
"With Send All History flag all sync entries are sent to Sync " \
"server including transitions of link, bookmark, reload, etc", \
kOsAll, \
FEATURE_VALUE_TYPE(brave_sync::features::kBraveSyncSendAllHistory), \
}, \
{ \
"brave-copy-clean-link-by-default", \
"Override default copy hotkey with copy clean link", \
Expand Down
1 change: 0 additions & 1 deletion build/config/brave_build.gni
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import("//brave/components/content_settings/core/browser/sources.gni")
import("//brave/components/omnibox/browser/sources.gni")
import("//brave/components/search_engines/sources.gni")
import("//brave/components/sync/service/sources.gni")
import("//brave/components/sync/sources.gni")
import("//brave/components/sync_device_info/sources.gni")
import("//brave/components/update_client/sources.gni")
import("//brave/installer/linux/sources.gni")
Expand Down
2 changes: 0 additions & 2 deletions chromium_src/check_chromium_src_config.json5
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
"chrome/install_static/brave_restore_google_update_integration.h",
"chrome/install_static/brave_stash_google_update_integration.h",
"chrome/install_static/brave_user_data_dir_win_unittest.cc",
"components/history/core/browser/sync/brave_typed_url_sync_bridge_unittest.cc",
"components/history/core/browser/sync/chromium_typed_url_sync_bridge_unittest.cc",
"components/privacy_sandbox/privacy_sandbox_settings_unittest.cc",
"components/search_engines/brave_template_url_prepopulate_data_unittest.cc",
"components/search_engines/brave_template_url_service_util_unittest.cc",
Expand Down
4 changes: 4 additions & 0 deletions chromium_src/components/browser_sync/DEPS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include_rules = [
"+brave/components/history/core/browser/sync/brave_history_delete_directives_model_type_controller.h",
"+brave/components/history/core/browser/sync/brave_history_model_type_controller.h",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* Copyright (c) 2023 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/. */

#include "brave/components/history/core/browser/sync/brave_history_delete_directives_model_type_controller.h"
#include "brave/components/history/core/browser/sync/brave_history_model_type_controller.h"

#define HistoryDeleteDirectivesModelTypeController \
BraveHistoryDeleteDirectivesModelTypeController

#define HistoryModelTypeController BraveHistoryModelTypeController

#include "src/components/browser_sync/sync_api_component_factory_impl.cc"

#undef HistoryModelTypeController
#undef HistoryDeleteDirectivesModelTypeController
89 changes: 0 additions & 89 deletions chromium_src/components/history/core/browser/history_backend.cc

This file was deleted.

13 changes: 0 additions & 13 deletions chromium_src/components/history/core/browser/history_backend.h

This file was deleted.

3 changes: 3 additions & 0 deletions chromium_src/components/history/core/browser/sync/DEPS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include_rules = [
"+src/components/history/core/browser/sync/delete_directive_handler_unittest.cc",
]

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* Copyright (c) 2023 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/. */

#include "components/history/core/browser/sync/delete_directive_handler.h"

#define CreateUrlDeleteDirective CreateUrlDeleteDirective_ChromiumImpl
#include "src/components/history/core/browser/sync/delete_directive_handler.cc"
#undef CreateUrlDeleteDirective

namespace history {

bool DeleteDirectiveHandler::CreateUrlDeleteDirective(const GURL& url) {
return false;
}

} // namespace history
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* Copyright (c) 2023 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/. */

#ifndef BRAVE_CHROMIUM_SRC_COMPONENTS_HISTORY_CORE_BROWSER_SYNC_DELETE_DIRECTIVE_HANDLER_H_
#define BRAVE_CHROMIUM_SRC_COMPONENTS_HISTORY_CORE_BROWSER_SYNC_DELETE_DIRECTIVE_HANDLER_H_

#define CreateTimeRangeDeleteDirective \
CreateUrlDeleteDirective_ChromiumImpl(const GURL& url); \
bool CreateTimeRangeDeleteDirective

#include "src/components/history/core/browser/sync/delete_directive_handler.h" // IWYU pragma: export

#undef CreateTimeRangeDeleteDirective

#endif // BRAVE_CHROMIUM_SRC_COMPONENTS_HISTORY_CORE_BROWSER_SYNC_DELETE_DIRECTIVE_HANDLER_H_
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* Copyright (c) 2023 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/. */

#include "src/components/history/core/browser/sync/delete_directive_handler_unittest.cc"

namespace history {
namespace {

TEST_F(HistoryDeleteDirectiveHandlerTest,
BraveCreateUrlDeleteDirectiveReturnsFalse) {
EXPECT_FALSE(handler()->CreateUrlDeleteDirective(GURL("https://brave.com")));
}

} // namespace
} // namespace history

This file was deleted.

Loading