Skip to content

Commit

Permalink
Adapt sync_ui_util.cc override to removal of sync_ui_util namespace
Browse files Browse the repository at this point in the history
Chromium change:

https://chromium.googlesource.com/chromium/src/+/5cd115f54c670fafd04972a66725113fd51302ba

commit 5cd115f54c670fafd04972a66725113fd51302ba
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date:   Mon Jun 14 17:08:28 2021 +0000

    Remove sync_ui_util namespace from c/b/sync/sync_ui_util.h

    No behavior is changed.
    Namespaces are discouraged for top-level embedders [1]. Since the
    namespace is removed:

    1) Rename the following so they aren't too generic:
    - MessageType -> SyncStatusMessageType
    - ActionType -> SyncStatusActionType
    - StatusLabels -> SyncStatusLabels
    - GetStatusLabels() -> GetSyncStatusLabels()
    - GetStatus() -> GetSyncStatus()

    2) Use enum classes rather than raw enums.

    Besides the above:
    3) Convert ENUM_VALUE casing to kEnumValue.
    4) Avoid one line over 80 characters and remove one unused function in
    sync_ui_util_unittest.cc

    [1] https://source.chromium.org/chromium/chromium/src/+/main:styleguide/c++/c++-dos-and-donts.md;l=294;drc=be05130dfdd2db2b14f73d0b99be3a2b4b118869

    Fixed: 1219516
  • Loading branch information
mariospr committed Jun 24, 2021
1 parent 4679c91 commit 03f0a04
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions chromium_src/chrome/browser/sync/sync_ui_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
// 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/.

#define GetAvatarSyncErrorType GetAvatarSyncErrorType_ChromiumImpl
#define GetAvatarSyncErrorType GetAvatarSyncErrorType_Unused
#include "../../../../../chrome/browser/sync/sync_ui_util.cc"
#undef GetAvatarSyncErrorType

namespace sync_ui_util {

absl::optional<AvatarSyncErrorType> GetAvatarSyncErrorType(Profile* profile) {
// Brave Sync works differently in that there is no sign-in
// and nothing to prompt the user to manage once their sync
// chain is setup.
return absl::nullopt;
}

} // namespace sync_ui_util

0 comments on commit 03f0a04

Please sign in to comment.