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

Side by Side Diff: chrome/utility/chrome_content_utility_client.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | « chrome/tools/crash_service/main.cc ('k') | chrome_frame/chrome_launcher_utils.cc » ('j') | 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/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
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
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
OLDNEW
« no previous file with comments | « chrome/tools/crash_service/main.cc ('k') | chrome_frame/chrome_launcher_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698