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

Side by Side Diff: trunk/src/content/ppapi_plugin/ppapi_plugin_main.cc

Issue 284333002: Revert 270872 "Move all callers of GetHomeDir() to PathService::..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 | « trunk/src/chromeos/chromeos_switches.cc ('k') | trunk/src/crypto/nss_util.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 "base/base_paths.h"
6 #include "base/command_line.h" 5 #include "base/command_line.h"
7 #include "base/debug/debugger.h" 6 #include "base/debug/debugger.h"
8 #include "base/files/file_path.h"
9 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
10 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
11 #include "base/path_service.h"
12 #include "base/threading/platform_thread.h" 9 #include "base/threading/platform_thread.h"
13 #include "build/build_config.h" 10 #include "build/build_config.h"
14 #include "content/child/child_process.h" 11 #include "content/child/child_process.h"
15 #include "content/common/content_constants_internal.h" 12 #include "content/common/content_constants_internal.h"
16 #include "content/common/sandbox_linux/sandbox_linux.h" 13 #include "content/common/sandbox_linux/sandbox_linux.h"
17 #include "content/ppapi_plugin/ppapi_thread.h" 14 #include "content/ppapi_plugin/ppapi_thread.h"
18 #include "content/public/common/content_client.h" 15 #include "content/public/common/content_client.h"
19 #include "content/public/common/content_switches.h" 16 #include "content/public/common/content_switches.h"
20 #include "content/public/common/main_function_params.h" 17 #include "content/public/common/main_function_params.h"
21 #include "content/public/plugin/content_plugin_client.h" 18 #include "content/public/plugin/content_plugin_client.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 std::replace(locale.begin(), locale.end(), '-', '_'); 94 std::replace(locale.begin(), locale.end(), '-', '_');
98 locale.append(".UTF-8"); 95 locale.append(".UTF-8");
99 setlocale(LC_ALL, locale.c_str()); 96 setlocale(LC_ALL, locale.c_str());
100 setenv("LANG", locale.c_str(), 0); 97 setenv("LANG", locale.c_str(), 0);
101 #endif 98 #endif
102 } 99 }
103 100
104 #if defined(OS_CHROMEOS) 101 #if defined(OS_CHROMEOS)
105 // Specifies $HOME explicitly because some plugins rely on $HOME but 102 // Specifies $HOME explicitly because some plugins rely on $HOME but
106 // no other part of Chrome OS uses that. See crbug.com/335290. 103 // no other part of Chrome OS uses that. See crbug.com/335290.
107 base::FilePath homedir; 104 setenv("HOME", base::GetHomeDir().value().c_str(), 1);
108 PathService::Get(base::DIR_HOME, &homedir);
109 setenv("HOME", homedir.value().c_str(), 1);
110 #endif 105 #endif
111 106
112 base::MessageLoop main_message_loop; 107 base::MessageLoop main_message_loop;
113 base::PlatformThread::SetName("CrPPAPIMain"); 108 base::PlatformThread::SetName("CrPPAPIMain");
114 base::debug::TraceLog::GetInstance()->SetProcessName("PPAPI Process"); 109 base::debug::TraceLog::GetInstance()->SetProcessName("PPAPI Process");
115 base::debug::TraceLog::GetInstance()->SetProcessSortIndex( 110 base::debug::TraceLog::GetInstance()->SetProcessSortIndex(
116 kTraceEventPpapiProcessSortIndex); 111 kTraceEventPpapiProcessSortIndex);
117 112
118 #if defined(OS_LINUX) && defined(USE_NSS) 113 #if defined(OS_LINUX) && defined(USE_NSS)
119 // Some out-of-process PPAPI plugins use NSS. 114 // Some out-of-process PPAPI plugins use NSS.
(...skipping 16 matching lines...) Expand all
136 131
137 #if defined(OS_WIN) 132 #if defined(OS_WIN)
138 SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont); 133 SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont);
139 #endif 134 #endif
140 135
141 main_message_loop.Run(); 136 main_message_loop.Run();
142 return 0; 137 return 0;
143 } 138 }
144 139
145 } // namespace content 140 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/chromeos/chromeos_switches.cc ('k') | trunk/src/crypto/nss_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698