Chromium Code Reviews| 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()); |
| 489 if (!font_family.empty()) | 490 if (!font_family.empty()) |
| 490 (*map)[script] = UTF8ToUTF16(font_family); | 491 (*map)[script] = UTF8ToUTF16(font_family); |
| 491 } | 492 } |
| 492 } | 493 } |
| 494 #endif | |
|
Nico
2013/11/10 05:07:09
optional: I inserted the endif on line 552 instead
hans
2013/11/11 19:29:51
Done.
| |
| 493 | 495 |
| 494 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 496 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 495 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( | 497 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( |
| 496 const std::string& process_type) { | 498 const std::string& process_type) { |
| 497 base::FilePath dumps_path; | 499 base::FilePath dumps_path; |
| 498 PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path); | 500 PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path); |
| 499 { | 501 { |
| 500 ANNOTATE_SCOPED_MEMORY_LEAK; | 502 ANNOTATE_SCOPED_MEMORY_LEAK; |
| 501 breakpad::CrashHandlerHostLinux* crash_handler = | 503 breakpad::CrashHandlerHostLinux* crash_handler = |
| 502 new breakpad::CrashHandlerHostLinux( | 504 new breakpad::CrashHandlerHostLinux( |
| 503 process_type, dumps_path, getenv(env_vars::kHeadless) == NULL); | 505 process_type, dumps_path, getenv(env_vars::kHeadless) == NULL); |
| 504 crash_handler->StartUploaderThread(); | 506 crash_handler->StartUploaderThread(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 540 | 542 |
| 541 if (process_type == switches::kGpuProcess) { | 543 if (process_type == switches::kGpuProcess) { |
| 542 static breakpad::CrashHandlerHostLinux* crash_handler = NULL; | 544 static breakpad::CrashHandlerHostLinux* crash_handler = NULL; |
| 543 if (!crash_handler) | 545 if (!crash_handler) |
| 544 crash_handler = CreateCrashHandlerHost(process_type); | 546 crash_handler = CreateCrashHandlerHost(process_type); |
| 545 return crash_handler->GetDeathSignalSocket(); | 547 return crash_handler->GetDeathSignalSocket(); |
| 546 } | 548 } |
| 547 | 549 |
| 548 return -1; | 550 return -1; |
| 549 } | 551 } |
| 550 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 552 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !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 |