From 9e49f31d9542fe5cd53091733dc1d1a799ba6a3a Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Tue, 2 Dec 2014 08:03:29 -0300 Subject: [PATCH] Fix Windows build. Rename CreateWindow to avoid conflicting with some other symbols. --- runtime/browser/runtime_ui_delegate.cc | 4 ++-- runtime/browser/xwalk_browser_context.cc | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime/browser/runtime_ui_delegate.cc b/runtime/browser/runtime_ui_delegate.cc index 4c996beabf..94f9a77999 100644 --- a/runtime/browser/runtime_ui_delegate.cc +++ b/runtime/browser/runtime_ui_delegate.cc @@ -21,7 +21,7 @@ namespace { const int kDefaultWidth = 840; const int kDefaultHeight = 600; -NativeAppWindow* CreateWindow( +NativeAppWindow* RuntimeCreateWindow( Runtime* runtime, const NativeAppWindow::CreateParams& params) { NativeAppWindow* window = NativeAppWindow::Create(params); // FIXME : Pass an App icon in params. @@ -76,7 +76,7 @@ void DefaultRuntimeUIDelegate::Show() { window_params_.bounds = gfx::Rect(0, 0, kDefaultWidth, kDefaultHeight); window_params_.delegate = this; window_params_.web_contents = runtime_->web_contents(); - window_ = CreateWindow(runtime_, window_params_); + window_ = RuntimeCreateWindow(runtime_, window_params_); } window_->Show(); #else diff --git a/runtime/browser/xwalk_browser_context.cc b/runtime/browser/xwalk_browser_context.cc index 892b11b3a7..19c245ccd8 100644 --- a/runtime/browser/xwalk_browser_context.cc +++ b/runtime/browser/xwalk_browser_context.cc @@ -203,7 +203,11 @@ XWalkBrowserContext::GetURLRequestContextGetterById( const std::string& pkg_id) { for (PartitionPathContextGetterMap::iterator it = context_getters_.begin(); it != context_getters_.end(); ++it) { +#if defined(OS_WIN) + if (it->first.find(base::UTF8ToWide(pkg_id))) +#else if (it->first.find(pkg_id)) +#endif return it->second.get(); } return 0;