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

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

Issue 11264006: Pass font prefs to WebKit even if they are the empty string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } 354 }
355 355
356 // Fills |map| with the per-script font prefs under path |map_name|. 356 // Fills |map| with the per-script font prefs under path |map_name|.
357 void FillFontFamilyMap(const PrefService* prefs, 357 void FillFontFamilyMap(const PrefService* prefs,
358 const char* map_name, 358 const char* map_name,
359 WebPreferences::ScriptFontFamilyMap* map) { 359 WebPreferences::ScriptFontFamilyMap* map) {
360 for (size_t i = 0; i < prefs::kWebKitScriptsForFontFamilyMapsLength; ++i) { 360 for (size_t i = 0; i < prefs::kWebKitScriptsForFontFamilyMapsLength; ++i) {
361 const char* script = prefs::kWebKitScriptsForFontFamilyMaps[i]; 361 const char* script = prefs::kWebKitScriptsForFontFamilyMaps[i];
362 std::string pref_name = base::StringPrintf("%s.%s", map_name, script); 362 std::string pref_name = base::StringPrintf("%s.%s", map_name, script);
363 std::string font_family = prefs->GetString(pref_name.c_str()); 363 std::string font_family = prefs->GetString(pref_name.c_str());
364 if (!font_family.empty()) 364 (*map)[script] = UTF8ToUTF16(font_family);
365 (*map)[script] = UTF8ToUTF16(font_family);
366 } 365 }
367 } 366 }
368 367
369 #if defined(OS_POSIX) && !defined(OS_MACOSX) 368 #if defined(OS_POSIX) && !defined(OS_MACOSX)
370 int GetCrashSignalFD(const CommandLine& command_line) { 369 int GetCrashSignalFD(const CommandLine& command_line) {
371 if (command_line.HasSwitch(switches::kExtensionProcess)) { 370 if (command_line.HasSwitch(switches::kExtensionProcess)) {
372 ExtensionCrashHandlerHostLinux* crash_handler = 371 ExtensionCrashHandlerHostLinux* crash_handler =
373 ExtensionCrashHandlerHostLinux::GetInstance(); 372 ExtensionCrashHandlerHostLinux::GetInstance();
374 return crash_handler->GetDeathSignalSocket(); 373 return crash_handler->GetDeathSignalSocket();
375 } 374 }
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 partition_id = extension->id(); 1848 partition_id = extension->id();
1850 } 1849 }
1851 1850
1852 // Enforce that IsValidStoragePartitionId() implementation stays in sync. 1851 // Enforce that IsValidStoragePartitionId() implementation stays in sync.
1853 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); 1852 DCHECK(IsValidStoragePartitionId(browser_context, partition_id));
1854 return partition_id; 1853 return partition_id;
1855 } 1854 }
1856 1855
1857 1856
1858 } // namespace chrome 1857 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698