-
Notifications
You must be signed in to change notification settings - Fork 906
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8cd54f3
commit d9894b2
Showing
6 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
chromium_src/components/sync/engine/sync_manager_factory.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* Copyright (c) 2020 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 http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/components/sync/engine_impl/brave_sync_manager_impl.h" | ||
|
||
#define SyncManagerImpl BraveSyncManagerImpl | ||
#include "../../../../../components/sync/engine/sync_manager_factory.cc" | ||
#undef SyncManagerImpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* Copyright (c) 2020 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 http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/components/sync/engine_impl/brave_sync_manager_impl.h" | ||
|
||
namespace syncer { | ||
|
||
BraveSyncManagerImpl::BraveSyncManagerImpl( | ||
const std::string& name, | ||
network::NetworkConnectionTracker* network_connection_tracker) | ||
: SyncManagerImpl(name, network_connection_tracker) {} | ||
|
||
BraveSyncManagerImpl::~BraveSyncManagerImpl() {} | ||
|
||
void BraveSyncManagerImpl::StartSyncingNormally(base::Time last_poll_time) { | ||
SyncManagerImpl::StartSyncingNormally(last_poll_time); | ||
// Remove this hack when we have FCM invalidation integrated. | ||
// We only enable BOOKMARKS by default so only force refresh it | ||
RefreshTypes(ModelTypeSet(BOOKMARKS)); | ||
} | ||
|
||
} // namespace syncer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* Copyright (c) 2020 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 http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef BRAVE_COMPONENTS_SYNC_ENGINE_IMPL_BRAVE_SYNC_MANAGER_IMPL_H_ | ||
#define BRAVE_COMPONENTS_SYNC_ENGINE_IMPL_BRAVE_SYNC_MANAGER_IMPL_H_ | ||
|
||
#include <string> | ||
|
||
#include "components/sync/engine_impl/sync_manager_impl.h" | ||
|
||
namespace syncer { | ||
|
||
class BraveSyncManagerImpl : public SyncManagerImpl { | ||
public: | ||
BraveSyncManagerImpl( | ||
const std::string& name, | ||
network::NetworkConnectionTracker* network_connection_tracker); | ||
~BraveSyncManagerImpl() override; | ||
|
||
void StartSyncingNormally(base::Time last_poll_time) override; | ||
|
||
private: | ||
DISALLOW_COPY_AND_ASSIGN(BraveSyncManagerImpl); | ||
}; | ||
|
||
} // namespace syncer | ||
|
||
#endif // BRAVE_COMPONENTS_SYNC_ENGINE_IMPL_BRAVE_SYNC_MANAGER_IMPL_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2020 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 http://mozilla.org/MPL/2.0/. | ||
|
||
brave_components_sync_sources = [ | ||
"//brave/components/sync/engine_impl/brave_sync_manager_impl.cc", | ||
"//brave/components/sync/engine_impl/brave_sync_manager_impl.h", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/components/sync/BUILD.gn b/components/sync/BUILD.gn | ||
index db5a9d0154d0c1e1390e4af6272d7d6cebe24b57..3cde948c91c4aa13297de70dafa86ee33db32906 100644 | ||
--- a/components/sync/BUILD.gn | ||
+++ b/components/sync/BUILD.gn | ||
@@ -413,6 +413,7 @@ jumbo_static_library("rest_of_sync") { | ||
"syncable/write_transaction_info.cc", | ||
"syncable/write_transaction_info.h", | ||
] | ||
+ sources += brave_components_sync_sources | ||
|
||
configs += [ "//build/config:precompiled_headers" ] | ||
|