summaryrefslogtreecommitdiffstats
path: root/chrome/common/chrome_plugin_util.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 01:51:21 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 01:51:21 +0000
commit387b71b7d1d1bf267cbe088136610959b319f3b3 (patch)
treec364e3543f8b9185f65086ef678989edd0b69966 /chrome/common/chrome_plugin_util.cc
parentceed72954b3444d1f06468a2edc6fe41aeb8f012 (diff)
downloadchromium_src-387b71b7d1d1bf267cbe088136610959b319f3b3.zip
chromium_src-387b71b7d1d1bf267cbe088136610959b319f3b3.tar.gz
chromium_src-387b71b7d1d1bf267cbe088136610959b319f3b3.tar.bz2
Make chrome_plugin_host.cc and chrome_plugin_util.cc compile on Posix.
Review URL: http://codereview.chromium.org/27150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10436 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_plugin_util.cc')
-rw-r--r--chrome/common/chrome_plugin_util.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/chrome/common/chrome_plugin_util.cc b/chrome/common/chrome_plugin_util.cc
index e7a2ed0..922c837 100644
--- a/chrome/common/chrome_plugin_util.cc
+++ b/chrome/common/chrome_plugin_util.cc
@@ -22,8 +22,13 @@ ScopableCPRequest::ScopableCPRequest(const char* u, const char* m,
CPBrowsingContext c) {
pdata = NULL;
data = NULL;
+#if defined(OS_WIN)
url = _strdup(u);
method = _strdup(m);
+#else
+ url = strdup(u);
+ method = strdup(m);
+#endif
context = c;
}
@@ -94,7 +99,7 @@ uint32 PluginResponseUtils::CPLoadFlagsToNetFlags(uint32 flags) {
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 @@ CPError CPB_GetCommandLineArgumentsCommon(const char* url,
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;
}
}