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

Side by Side Diff: chrome/browser/font_family_cache.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/font_family_cache.h" 5 #include "chrome/browser/font_family_cache.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 10
11 #include "base/prefs/pref_service.h"
12 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
13 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
14 #include "chrome/browser/chrome_notification_types.h" 13 #include "chrome/browser/chrome_notification_types.h"
15 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/common/pref_font_webkit_names.h" 15 #include "chrome/common/pref_font_webkit_names.h"
17 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "components/prefs/pref_service.h"
18 #include "content/public/browser/notification_source.h" 18 #include "content/public/browser/notification_source.h"
19 19
20 // Identifies the user data on the profile. 20 // Identifies the user data on the profile.
21 const char kFontFamilyCacheKey[] = "FontFamilyCacheKey"; 21 const char kFontFamilyCacheKey[] = "FontFamilyCacheKey";
22 22
23 FontFamilyCache::FontFamilyCache(Profile* profile) 23 FontFamilyCache::FontFamilyCache(Profile* profile)
24 : prefs_(profile->GetPrefs()) { 24 : prefs_(profile->GetPrefs()) {
25 profile_pref_registrar_.Init(profile->GetPrefs()); 25 profile_pref_registrar_.Init(profile->GetPrefs());
26 notification_registrar_.Add(this, 26 notification_registrar_.Add(this,
27 chrome::NOTIFICATION_PROFILE_DESTROYED, 27 chrome::NOTIFICATION_PROFILE_DESTROYED,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 } 128 }
129 } 129 }
130 130
131 void FontFamilyCache::Observe(int type, 131 void FontFamilyCache::Observe(int type,
132 const content::NotificationSource& source, 132 const content::NotificationSource& source,
133 const content::NotificationDetails& details) { 133 const content::NotificationDetails& details) {
134 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); 134 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type);
135 profile_pref_registrar_.RemoveAll(); 135 profile_pref_registrar_.RemoveAll();
136 } 136 }
OLDNEW
« no previous file with comments | « chrome/browser/font_family_cache.h ('k') | chrome/browser/geolocation/chrome_access_token_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698