summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/chrome_plugin_util.cc14
-rw-r--r--chrome/common/chrome_plugin_util.h2
-rw-r--r--chrome/common/common.scons1
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc19
-rw-r--r--chrome/common/temp_scaffolding_stubs.h10
5 files changed, 20 insertions, 26 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;
}
}
diff --git a/chrome/common/chrome_plugin_util.h b/chrome/common/chrome_plugin_util.h
index 07f99e4..ef0b982 100644
--- a/chrome/common/chrome_plugin_util.h
+++ b/chrome/common/chrome_plugin_util.h
@@ -64,7 +64,7 @@ public:
// Common implementation of a CPR_GetResponseInfo call.
static int GetResponseInfo(
const net::HttpResponseHeaders* response_headers,
- CPResponseInfoType type, void* buf, uint32 buf_size);
+ CPResponseInfoType type, void* buf, size_t buf_size);
};
// Helper to allocate a string using the given CPB_Alloc function.
diff --git a/chrome/common/common.scons b/chrome/common/common.scons
index 617c4c1..bd94858 100644
--- a/chrome/common/common.scons
+++ b/chrome/common/common.scons
@@ -232,7 +232,6 @@ if not env.Bit('windows'):
# TODO(port): Port these.
input_files.Remove(
- 'chrome_plugin_util.cc',
'chrome_process_filter.cc',
'drag_drop_types.cc',
'gfx/emf.cc',
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index baaf839..47789bb 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -246,11 +246,6 @@ bool IsPluginProcess() {
//--------------------------------------------------------------------------
-// This is from chrome_plugin_util.cc.
-void CPB_Free(void* memory) { NOTIMPLEMENTED(); }
-
-//--------------------------------------------------------------------------
-
void RunJavascriptMessageBox(WebContents* web_contents,
int dialog_flags,
const std::wstring& message_text,
@@ -352,10 +347,6 @@ void DebuggerShell::ProcessCommand(const std::wstring& data) {
}
#endif // !CHROME_DEBUGGER_DISABLED
-ScopableCPRequest::~ScopableCPRequest() {
- NOTIMPLEMENTED();
-}
-
MemoryDetails::MemoryDetails() {
NOTIMPLEMENTED();
}
@@ -379,21 +370,11 @@ InfoBar* LinkInfoBarDelegate::CreateInfoBar() {
return NULL;
}
-void CPHandleCommand(int command, CPCommandInterface* data,
- CPBrowsingContext context) {
- NOTIMPLEMENTED();
-}
-
bool CanImportURL(const GURL& url) {
NOTIMPLEMENTED();
return false;
}
-CPBrowserFuncs* GetCPBrowserFuncsForBrowser() {
- NOTIMPLEMENTED();
- return NULL;
-}
-
DownloadRequestDialogDelegate* DownloadRequestDialogDelegate::Create(
TabContents* tab,
DownloadRequestManager::TabDownloadState* host) {
diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h
index 3fbd2a1..ba7d9b5 100644
--- a/chrome/common/temp_scaffolding_stubs.h
+++ b/chrome/common/temp_scaffolding_stubs.h
@@ -629,6 +629,16 @@ class ModalHtmlDialogDelegate : public HtmlDialogContentsDelegate {
IPC::Message*, WebContents*) { }
};
+class HtmlDialogContents {
+ public:
+ struct HtmlDialogParams {
+ GURL url;
+ int width;
+ int height;
+ std::string json_input;
+ };
+};
+
class CharacterEncoding {
public:
static std::wstring GetCanonicalEncodingNameByAliasName(