-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notes: add profile pref storing the sort order for notes ui in side p…
…anel. Bug: 1394044 Change-Id: Ia7dda2c5deb193a894b4e579640c32e226c25335 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4246680 Commit-Queue: Caroline Rising <corising@chromium.org> Reviewed-by: Yuheng Huang <yuhengh@chromium.org> Reviewed-by: Ken Buchanan <kenrb@chromium.org> Reviewed-by: Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/main@{#1108316}
- Loading branch information
Caroline Rising
authored and
Chromium LUCI CQ
committed
Feb 22, 2023
1 parent
5f067d0
commit 065085a
Showing
16 changed files
with
156 additions
and
3 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
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
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
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
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
include_rules = [ | ||
"+components/keyed_service/core", | ||
"+components/pref_registry", | ||
"+components/prefs", | ||
"+ui", | ||
] |
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,25 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "components/user_notes/user_notes_prefs.h" | ||
|
||
#include "components/pref_registry/pref_registry_syncable.h" | ||
#include "components/prefs/pref_registry_simple.h" | ||
#include "components/user_notes/user_notes_features.h" | ||
|
||
namespace prefs { | ||
|
||
const char kUserNotesSortByNewest[] = "user_notes.sort_by_newest"; | ||
|
||
} // namespace prefs | ||
|
||
namespace user_notes { | ||
|
||
void RegisterProfilePrefs(PrefRegistrySimple* registry) { | ||
if (user_notes::IsUserNotesEnabled()) { | ||
registry->RegisterBooleanPref(prefs::kUserNotesSortByNewest, false); | ||
} | ||
} | ||
|
||
} // namespace user_notes |
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,25 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef COMPONENTS_USER_NOTES_USER_NOTES_PREFS_H_ | ||
#define COMPONENTS_USER_NOTES_USER_NOTES_PREFS_H_ | ||
|
||
class PrefRegistrySimple; | ||
|
||
namespace prefs { | ||
|
||
// Boolean that stores whether user notes should be sorted by newest and is used | ||
// for the sort order to display user's notes. | ||
extern const char kUserNotesSortByNewest[]; | ||
|
||
} // namespace prefs | ||
|
||
namespace user_notes { | ||
|
||
// Registers user preferences related to user notes. | ||
void RegisterProfilePrefs(PrefRegistrySimple* registry); | ||
|
||
} // namespace user_notes | ||
|
||
#endif // COMPONENTS_USER_NOTES_USER_NOTES_PREFS_H_ |