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

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

Issue 421193002: Fix ExtensionServiceTest.ClearExtensionData flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use base::DoNothing for empty callbacks Created 6 years, 4 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/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 disable_reason == Extension::DISABLE_USER_ACTION) { 365 disable_reason == Extension::DISABLE_USER_ACTION) {
366 remove_list.push_back((*it)->id()); 366 remove_list.push_back((*it)->id());
367 } 367 }
368 } 368 }
369 } 369 }
370 // TODO: Garbage collect all unused themes. This method misses themes which 370 // TODO: Garbage collect all unused themes. This method misses themes which
371 // are installed but not loaded because they are blacklisted by a management 371 // are installed but not loaded because they are blacklisted by a management
372 // policy provider. 372 // policy provider.
373 373
374 for (size_t i = 0; i < remove_list.size(); ++i) { 374 for (size_t i = 0; i < remove_list.size(); ++i) {
375 service->UninstallExtension( 375 service->UninstallExtension(remove_list[i],
376 remove_list[i], extensions::UNINSTALL_REASON_ORPHANED_THEME, NULL); 376 extensions::UNINSTALL_REASON_ORPHANED_THEME,
377 base::Bind(&base::DoNothing),
378 NULL);
377 } 379 }
378 } 380 }
379 381
380 void ThemeService::UseDefaultTheme() { 382 void ThemeService::UseDefaultTheme() {
381 if (ready_) 383 if (ready_)
382 content::RecordAction(UserMetricsAction("Themes_Reset")); 384 content::RecordAction(UserMetricsAction("Themes_Reset"));
383 if (IsSupervisedUser()) { 385 if (IsSupervisedUser()) {
384 SetSupervisedUserTheme(); 386 SetSupervisedUserTheme();
385 return; 387 return;
386 } 388 }
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 void ThemeService::OnInfobarDestroyed() { 605 void ThemeService::OnInfobarDestroyed() {
604 number_of_infobars_--; 606 number_of_infobars_--;
605 607
606 if (number_of_infobars_ == 0) 608 if (number_of_infobars_ == 0)
607 RemoveUnusedThemes(false); 609 RemoveUnusedThemes(false);
608 } 610 }
609 611
610 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { 612 ThemeSyncableService* ThemeService::GetThemeSyncableService() const {
611 return theme_syncable_service_.get(); 613 return theme_syncable_service_.get();
612 } 614 }
OLDNEW
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/browser/themes/theme_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698