Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7594)

Unified Diff: chrome/browser/themes/theme_service_mac.mm

Issue 2909183002: Replace deprecated base::NonThreadSafe in chrome/browser/themes in favor of SequenceChecker. (Closed)
Patch Set: Merge with theme_service_mac.mm changes Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/themes/theme_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service_mac.mm
diff --git a/chrome/browser/themes/theme_service_mac.mm b/chrome/browser/themes/theme_service_mac.mm
index 4ede5773f32569e2665bc7069d3bb9e6b115def6..e77cfcfb41fb23a7980272ddf9a01c4a604f4682 100644
--- a/chrome/browser/themes/theme_service_mac.mm
+++ b/chrome/browser/themes/theme_service_mac.mm
@@ -44,7 +44,7 @@ void HSLToHSB(const color_utils::HSL& hsl, CGFloat* h, CGFloat* s, CGFloat* b) {
} // namespace
NSImage* ThemeService::GetNSImageNamed(int id, bool incognito) const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
bool is_tab_or_toolbar_color =
id == IDR_THEME_TAB_BACKGROUND_INACTIVE ||
@@ -147,7 +147,7 @@ NSImage* ThemeService::GetNSImageNamed(int id, bool incognito) const {
}
NSColor* ThemeService::GetNSImageColorNamed(int id, bool incognito) const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
bool is_tab_or_toolbar_color =
id == IDR_THEME_TAB_BACKGROUND_INACTIVE ||
@@ -187,7 +187,7 @@ bool ThemeService::HasCustomColor(int id) const {
}
NSColor* ThemeService::GetNSColor(int id, bool incognito) const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
int original_id = id;
const bool is_mode_material = true;
@@ -216,7 +216,7 @@ NSColor* ThemeService::GetNSColor(int id, bool incognito) const {
}
NSColor* ThemeService::GetNSColorTint(int id) const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// Check to see if we already have the color in the cache.
NSColorMap::const_iterator nscolor_iter = nscolor_cache_.find(id);
@@ -245,7 +245,7 @@ NSColor* ThemeService::GetNSColorTint(int id) const {
}
NSGradient* ThemeService::GetNSGradient(int id) const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// Check to see if we already have the gradient in the cache.
NSGradientMap::const_iterator nsgradient_iter = nsgradient_cache_.find(id);
@@ -328,7 +328,7 @@ void ThemeService::NotifyPlatformThemeChanged() {
}
void ThemeService::FreePlatformCaches() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// Free images.
for (NSImageMap::iterator i = nsimage_cache_.begin();
« no previous file with comments | « chrome/browser/themes/theme_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698