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

Side by Side Diff: chrome/browser/themes/theme_service.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/themes/theme_service.h" 5 #include "chrome/browser/themes/theme_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 return ui::win::IsAeroGlassEnabled(); 174 return ui::win::IsAeroGlassEnabled();
175 #else 175 #else
176 return false; 176 return false;
177 #endif 177 #endif
178 } 178 }
179 179
180 bool ThemeService::HasCustomImage(int id) const { 180 bool ThemeService::HasCustomImage(int id) const {
181 if (!Properties::IsThemeableImage(id)) 181 if (!Properties::IsThemeableImage(id))
182 return false; 182 return false;
183 183
184 if (theme_pack_) 184 if (theme_pack_.get())
185 return theme_pack_->HasCustomImage(id); 185 return theme_pack_->HasCustomImage(id);
186 186
187 return false; 187 return false;
188 } 188 }
189 189
190 base::RefCountedMemory* ThemeService::GetRawData( 190 base::RefCountedMemory* ThemeService::GetRawData(
191 int id, 191 int id,
192 ui::ScaleFactor scale_factor) const { 192 ui::ScaleFactor scale_factor) const {
193 // Check to see whether we should substitute some images. 193 // Check to see whether we should substitute some images.
194 int ntp_alternate; 194 int ntp_alternate;
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 void ThemeService::OnInfobarDestroyed() { 419 void ThemeService::OnInfobarDestroyed() {
420 number_of_infobars_--; 420 number_of_infobars_--;
421 421
422 if (number_of_infobars_ == 0) 422 if (number_of_infobars_ == 0)
423 RemoveUnusedThemes(); 423 RemoveUnusedThemes();
424 } 424 }
425 425
426 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { 426 ThemeSyncableService* ThemeService::GetThemeSyncableService() const {
427 return theme_syncable_service_.get(); 427 return theme_syncable_service_.get();
428 } 428 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | chrome/browser/themes/theme_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698