-
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.
feed: Fork NoticeCardTracker for iOS
Creates a fork of this class for iOS, so that we can later change the API for other platforms(android). Now that this fork is in place, i was able to clean up a few things: * removed locking from the non-public notice card tracker, as it was only necessary on iOS. * re-arrange build targets, fewer sources are needed in ios now. * add 'public' headers for feed_core_v2 to restrict direct access to internal classes. Bug: 1213474 Change-Id: Idbfdf278cfd46d8fca8518b0e9812e6dca6af6ba Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2956401 Reviewed-by: Ian Wells <iwells@chromium.org> Commit-Queue: Dan H <harringtond@chromium.org> Cr-Commit-Position: refs/heads/master@{#892285}
- Loading branch information
Dan Harrington
authored and
Chromium LUCI CQ
committed
Jun 14, 2021
1 parent
60b0cca
commit 1aea98c
Showing
19 changed files
with
435 additions
and
154 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2021 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef COMPONENTS_FEED_CORE_V2_IOS_SHARED_PREFS_H_ | ||
#define COMPONENTS_FEED_CORE_V2_IOS_SHARED_PREFS_H_ | ||
|
||
class PrefService; | ||
|
||
namespace feed { | ||
namespace prefs { | ||
void SetLastFetchHadNoticeCard(PrefService& pref_service, bool value); | ||
bool GetLastFetchHadNoticeCard(const PrefService& pref_service); | ||
void SetHasReachedClickAndViewActionsUploadConditions(PrefService& pref_service, | ||
bool value); | ||
bool GetHasReachedClickAndViewActionsUploadConditions( | ||
const PrefService& pref_service); | ||
|
||
// Increment the stored notice card views count by 1. | ||
void IncrementNoticeCardViewsCount(PrefService& pref_service); | ||
// Increment the stored notice card clicks count by 1. | ||
void IncrementNoticeCardClicksCount(PrefService& pref_service); | ||
int GetNoticeCardClicksCount(const PrefService& pref_service); | ||
int GetNoticeCardViewsCount(const PrefService& pref_service); | ||
} // namespace prefs | ||
} // namespace feed | ||
|
||
#endif // COMPONENTS_FEED_CORE_V2_IOS_SHARED_PREFS_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
Oops, something went wrong.