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

Unified Diff: chrome/browser/themes/theme_service.cc

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.h ('k') | chrome/browser/themes/theme_service_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service.cc
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 3a0161e9881e235d2e307ff2307da9b772a3538d..6a9d0e1e40a102972fba8dd3e20467802ff9fe0a 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -225,11 +225,12 @@ ThemeService::ThemeService()
weak_ptr_factory_(this) {}
ThemeService::~ThemeService() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
FreePlatformCaches();
}
void ThemeService::Init(Profile* profile) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
profile_ = profile;
LoadThemePrefs();
@@ -520,7 +521,7 @@ SkColor ThemeService::GetDefaultColor(int id, bool incognito) const {
}
color_utils::HSL ThemeService::GetTint(int id, bool incognito) const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
color_utils::HSL hsl;
if (theme_supplier_ && theme_supplier_->GetTint(id, &hsl))
@@ -694,7 +695,7 @@ gfx::ImageSkia* ThemeService::GetImageSkiaNamed(int id, bool incognito) const {
}
SkColor ThemeService::GetColor(int id, bool incognito) const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// For legacy reasons, |theme_supplier_| requires the incognito variants
// of color IDs.
@@ -758,7 +759,7 @@ base::RefCountedMemory* ThemeService::GetRawData(
}
gfx::Image ThemeService::GetImageNamed(int id, bool incognito) const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
int adjusted_id = id;
if (incognito) {
« no previous file with comments | « chrome/browser/themes/theme_service.h ('k') | chrome/browser/themes/theme_service_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698