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

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

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 if (!service) 834 if (!service)
835 return; 835 return;
836 836
837 // Write the packed file to disk. 837 // Write the packed file to disk.
838 base::FilePath pack_path = 838 base::FilePath pack_path =
839 extension->path().Append(ui::MaterialDesignController::IsModeMaterial() 839 extension->path().Append(ui::MaterialDesignController::IsModeMaterial()
840 ? chrome::kThemePackMaterialDesignFilename 840 ? chrome::kThemePackMaterialDesignFilename
841 : chrome::kThemePackFilename); 841 : chrome::kThemePackFilename);
842 service->GetFileTaskRunner()->PostTask( 842 service->GetFileTaskRunner()->PostTask(
843 FROM_HERE, 843 FROM_HERE,
844 base::Bind(&WritePackToDiskCallback, pack, pack_path)); 844 base::Bind(&WritePackToDiskCallback, base::RetainedRef(pack), pack_path));
845 845
846 // Save only the extension path. The packed file which matches the 846 // Save only the extension path. The packed file which matches the
847 // MaterialDesignController::Mode will be loaded via LoadThemePrefs(). 847 // MaterialDesignController::Mode will be loaded via LoadThemePrefs().
848 SavePackName(extension->path()); 848 SavePackName(extension->path());
849 SwapThemeSupplier(pack); 849 SwapThemeSupplier(pack);
850 } 850 }
851 851
852 #if defined(ENABLE_SUPERVISED_USERS) 852 #if defined(ENABLE_SUPERVISED_USERS)
853 bool ThemeService::IsSupervisedUser() const { 853 bool ThemeService::IsSupervisedUser() const {
854 return profile_->IsSupervised(); 854 return profile_->IsSupervised();
855 } 855 }
856 856
857 void ThemeService::SetSupervisedUserTheme() { 857 void ThemeService::SetSupervisedUserTheme() {
858 SetCustomDefaultTheme(new SupervisedUserTheme); 858 SetCustomDefaultTheme(new SupervisedUserTheme);
859 } 859 }
860 #endif 860 #endif
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/local/sync_file_system_backend.cc ('k') | chrome/browser/ui/login/login_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698