OLD | NEW |
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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 return true; | 469 return true; |
470 | 470 |
471 std::string common_name; | 471 std::string common_name; |
472 if (filter.GetString("ISSUER.CN", &common_name) && | 472 if (filter.GetString("ISSUER.CN", &common_name) && |
473 (cert.issuer().common_name == common_name)) { | 473 (cert.issuer().common_name == common_name)) { |
474 return true; | 474 return true; |
475 } | 475 } |
476 return false; | 476 return false; |
477 } | 477 } |
478 | 478 |
| 479 #if !defined(OS_ANDROID) |
479 // Fills |map| with the per-script font prefs under path |map_name|. | 480 // Fills |map| with the per-script font prefs under path |map_name|. |
480 void FillFontFamilyMap(const PrefService* prefs, | 481 void FillFontFamilyMap(const PrefService* prefs, |
481 const char* map_name, | 482 const char* map_name, |
482 webkit_glue::ScriptFontFamilyMap* map) { | 483 webkit_glue::ScriptFontFamilyMap* map) { |
483 // TODO: Get rid of the brute-force scan over possible (font family / script) | 484 // TODO: Get rid of the brute-force scan over possible (font family / script) |
484 // combinations - see http://crbug.com/308095. | 485 // combinations - see http://crbug.com/308095. |
485 for (size_t i = 0; i < prefs::kWebKitScriptsForFontFamilyMapsLength; ++i) { | 486 for (size_t i = 0; i < prefs::kWebKitScriptsForFontFamilyMapsLength; ++i) { |
486 const char* script = prefs::kWebKitScriptsForFontFamilyMaps[i]; | 487 const char* script = prefs::kWebKitScriptsForFontFamilyMaps[i]; |
487 std::string pref_name = base::StringPrintf("%s.%s", map_name, script); | 488 std::string pref_name = base::StringPrintf("%s.%s", map_name, script); |
488 std::string font_family = prefs->GetString(pref_name.c_str()); | 489 std::string font_family = prefs->GetString(pref_name.c_str()); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 if (process_type == switches::kGpuProcess) { | 542 if (process_type == switches::kGpuProcess) { |
542 static breakpad::CrashHandlerHostLinux* crash_handler = NULL; | 543 static breakpad::CrashHandlerHostLinux* crash_handler = NULL; |
543 if (!crash_handler) | 544 if (!crash_handler) |
544 crash_handler = CreateCrashHandlerHost(process_type); | 545 crash_handler = CreateCrashHandlerHost(process_type); |
545 return crash_handler->GetDeathSignalSocket(); | 546 return crash_handler->GetDeathSignalSocket(); |
546 } | 547 } |
547 | 548 |
548 return -1; | 549 return -1; |
549 } | 550 } |
550 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 551 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
| 552 #endif // !defined(OS_ANDROID) |
551 | 553 |
552 #if !defined(OS_CHROMEOS) | 554 #if !defined(OS_CHROMEOS) |
553 GURL GetEffectiveURLForSignin(const GURL& url) { | 555 GURL GetEffectiveURLForSignin(const GURL& url) { |
554 CHECK(SigninManager::IsWebBasedSigninFlowURL(url)); | 556 CHECK(SigninManager::IsWebBasedSigninFlowURL(url)); |
555 | 557 |
556 GURL effective_url(SigninManager::kChromeSigninEffectiveSite); | 558 GURL effective_url(SigninManager::kChromeSigninEffectiveSite); |
557 // Copy the path because the argument to SetPathStr must outlive | 559 // Copy the path because the argument to SetPathStr must outlive |
558 // the Replacements object. | 560 // the Replacements object. |
559 const std::string path_copy(url.path()); | 561 const std::string path_copy(url.path()); |
560 GURL::Replacements replacements; | 562 GURL::Replacements replacements; |
(...skipping 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2630 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, | 2632 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
2631 allowed_file_handle_origins_) || | 2633 allowed_file_handle_origins_) || |
2632 IsHostAllowedByCommandLine(url, extension_set, | 2634 IsHostAllowedByCommandLine(url, extension_set, |
2633 switches::kAllowNaClFileHandleAPI); | 2635 switches::kAllowNaClFileHandleAPI); |
2634 #else | 2636 #else |
2635 return false; | 2637 return false; |
2636 #endif | 2638 #endif |
2637 } | 2639 } |
2638 | 2640 |
2639 } // namespace chrome | 2641 } // namespace chrome |
OLD | NEW |