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

Unified Diff: chrome/common/chrome_plugin_util.cc

Issue 27150: Make chrome_plugin_host.cc and chrome_plugin_util.cc compile on Posix. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_plugin_util.h ('k') | chrome/common/common.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_plugin_util.cc
===================================================================
--- chrome/common/chrome_plugin_util.cc (revision 10402)
+++ chrome/common/chrome_plugin_util.cc (working copy)
@@ -22,8 +22,13 @@
CPBrowsingContext c) {
pdata = NULL;
data = NULL;
+#if defined(OS_WIN)
url = _strdup(u);
Matt Perry 2009/02/26 01:30:57 Do we have a cross-platform version of this functi
method = _strdup(m);
+#else
+ url = strdup(u);
+ method = strdup(m);
+#endif
context = c;
}
@@ -94,7 +99,7 @@
int PluginResponseUtils::GetResponseInfo(
const net::HttpResponseHeaders* response_headers,
- CPResponseInfoType type, void* buf, uint32 buf_size) {
+ CPResponseInfoType type, void* buf, size_t buf_size) {
if (!response_headers)
return CPERR_FAILURE;
@@ -129,11 +134,10 @@
std::wstring user_data_dir = cmd.GetSwitchValue(switches::kUserDataDir);
if (!user_data_dir.empty()) {
// Make sure user_data_dir is an absolute path.
- wchar_t user_data_dir_full[MAX_PATH];
- if (_wfullpath(user_data_dir_full, user_data_dir.c_str(), MAX_PATH) &&
- file_util::PathExists(user_data_dir_full)) {
+ if (file_util::AbsolutePath(&user_data_dir) &&
+ file_util::PathExists(user_data_dir)) {
arguments_w += std::wstring(L"--") + switches::kUserDataDir +
- L'=' + user_data_dir_full;
+ L'=' + user_data_dir;
}
}
« no previous file with comments | « chrome/common/chrome_plugin_util.h ('k') | chrome/common/common.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698