| 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/utility/chrome_content_utility_client.h" | 5 #include "chrome/utility/chrome_content_utility_client.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 ChromeContentUtilityClient::~ChromeContentUtilityClient() { | 75 ChromeContentUtilityClient::~ChromeContentUtilityClient() { |
| 76 } | 76 } |
| 77 | 77 |
| 78 void ChromeContentUtilityClient::UtilityThreadStarted() { | 78 void ChromeContentUtilityClient::UtilityThreadStarted() { |
| 79 #if defined(OS_WIN) | 79 #if defined(OS_WIN) |
| 80 // Load the pdf plugin before the sandbox is turned on. This is for Windows | 80 // Load the pdf plugin before the sandbox is turned on. This is for Windows |
| 81 // only because we need this DLL only on Windows. | 81 // only because we need this DLL only on Windows. |
| 82 base::FilePath pdf; | 82 base::FilePath pdf; |
| 83 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && | 83 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && |
| 84 file_util::PathExists(pdf)) { | 84 base::PathExists(pdf)) { |
| 85 bool rv = !!LoadLibrary(pdf.value().c_str()); | 85 bool rv = !!LoadLibrary(pdf.value().c_str()); |
| 86 DCHECK(rv) << "Couldn't load PDF plugin"; | 86 DCHECK(rv) << "Couldn't load PDF plugin"; |
| 87 } | 87 } |
| 88 #endif | 88 #endif |
| 89 | 89 |
| 90 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 90 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 91 std::string lang = command_line->GetSwitchValueASCII(switches::kLang); | 91 std::string lang = command_line->GetSwitchValueASCII(switches::kLang); |
| 92 if (!lang.empty()) | 92 if (!lang.empty()) |
| 93 extension_l10n_util::SetProcessLocale(lang); | 93 extension_l10n_util::SetProcessLocale(lang); |
| 94 } | 94 } |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 bool parse_success = reader.Init(); | 543 bool parse_success = reader.Init(); |
| 544 Send(new ChromeUtilityHostMsg_ParsePicasaPMPDatabase_Finished( | 544 Send(new ChromeUtilityHostMsg_ParsePicasaPMPDatabase_Finished( |
| 545 parse_success, | 545 parse_success, |
| 546 reader.albums(), | 546 reader.albums(), |
| 547 reader.folders())); | 547 reader.folders())); |
| 548 ReleaseProcessIfNeeded(); | 548 ReleaseProcessIfNeeded(); |
| 549 } | 549 } |
| 550 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 550 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
| 551 | 551 |
| 552 } // namespace chrome | 552 } // namespace chrome |
| OLD | NEW |