diff options
Diffstat (limited to 'chrome')
41 files changed, 890 insertions, 861 deletions
diff --git a/chrome/browser/automation/automation_provider_gtk.cc b/chrome/browser/automation/automation_provider_gtk.cc index 8b391ee..06abc4f 100644 --- a/chrome/browser/automation/automation_provider_gtk.cc +++ b/chrome/browser/automation/automation_provider_gtk.cc @@ -6,6 +6,7 @@ #include <gtk/gtk.h> +#include "base/utf_string_conversions.h" #include "chrome/browser/automation/ui_controls.h" #include "chrome/browser/automation/automation_browser_tracker.h" #include "chrome/browser/automation/automation_window_tracker.h" diff --git a/chrome/browser/automation/automation_provider_win.cc b/chrome/browser/automation/automation_provider_win.cc index 0bb238b..9a227cd 100644 --- a/chrome/browser/automation/automation_provider_win.cc +++ b/chrome/browser/automation/automation_provider_win.cc @@ -7,6 +7,7 @@ #include "base/json/json_reader.h" #include "base/keyboard_codes.h" #include "base/trace_event.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/automation/automation_browser_tracker.h" #include "chrome/browser/automation/automation_extension_function.h" #include "chrome/browser/automation/automation_tab_tracker.h" diff --git a/chrome/browser/cocoa/about_ipc_controller.mm b/chrome/browser/cocoa/about_ipc_controller.mm index 32a9933..ccccf8b 100644 --- a/chrome/browser/cocoa/about_ipc_controller.mm +++ b/chrome/browser/cocoa/about_ipc_controller.mm @@ -38,19 +38,19 @@ } - (NSString*)message { - if (data_.message_name == L"") { + if (data_.message_name == "") { int high = data_.type >> 12; int low = data_.type - (high<<12); return [NSString stringWithFormat:@"type=(%d,%d) 0x%x,0x%x", high, low, high, low]; } else { - return base::SysWideToNSString(data_.message_name); + return base::SysUTF8ToNSString(data_.message_name); } } - (NSString*)flags { - return base::SysWideToNSString(data_.flags); + return base::SysUTF8ToNSString(data_.flags); } - (NSString*)dispatch { @@ -68,7 +68,7 @@ } - (NSString*)parameters { - return base::SysWideToNSString(data_.params); + return base::SysUTF8ToNSString(data_.params); } @end diff --git a/chrome/browser/cocoa/about_ipc_controller_unittest.mm b/chrome/browser/cocoa/about_ipc_controller_unittest.mm index efe1a56..b36100a 100644 --- a/chrome/browser/cocoa/about_ipc_controller_unittest.mm +++ b/chrome/browser/cocoa/about_ipc_controller_unittest.mm @@ -24,9 +24,9 @@ TEST_F(AboutIPCControllerTest, TestFilter) { IPC::LogData data; // Make sure generic names do NOT get filtered. - std::wstring names[] = { L"PluginProcessingIsMyLife", - L"ViewMsgFoo", - L"NPObjectHell" }; + std::string names[] = { "PluginProcessingIsMyLife", + "ViewMsgFoo", + "NPObjectHell" }; for (size_t i = 0; i < arraysize(names); i++) { data.message_name = names[i]; scoped_nsobject<CocoaLogData> cdata([[CocoaLogData alloc] @@ -35,7 +35,7 @@ TEST_F(AboutIPCControllerTest, TestFilter) { } // Flip a checkbox, see it filtered, flip back, all is fine. - data.message_name = L"ViewMsgFoo"; + data.message_name = "ViewMsgFoo"; scoped_nsobject<CocoaLogData> cdata([[CocoaLogData alloc] initWithLogData:data]); [controller setDisplayViewMessages:NO]; diff --git a/chrome/browser/debugger/debugger_remote_service.cc b/chrome/browser/debugger/debugger_remote_service.cc index d66896b..ba77fb9 100644 --- a/chrome/browser/debugger/debugger_remote_service.cc +++ b/chrome/browser/debugger/debugger_remote_service.cc @@ -10,6 +10,7 @@ #include "base/json/json_reader.h" #include "base/json/json_writer.h" #include "base/string_number_conversions.h" +#include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/debugger/devtools_manager.h" diff --git a/chrome/browser/debugger/devtools_http_protocol_handler.cc b/chrome/browser/debugger/devtools_http_protocol_handler.cc index 6efa6b7..817c3d7 100644 --- a/chrome/browser/debugger/devtools_http_protocol_handler.cc +++ b/chrome/browser/debugger/devtools_http_protocol_handler.cc @@ -9,6 +9,7 @@ #include "base/message_loop_proxy.h" #include "base/string_number_conversions.h" #include "base/thread.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/chrome_thread.h" diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index a2334e7..d0d4e80 100644 --- a/chrome/browser/debugger/devtools_window.cc +++ b/chrome/browser/debugger/devtools_window.cc @@ -5,6 +5,7 @@ #include "base/command_line.h" #include "base/json/json_writer.h" #include "base/string_number_conversions.h" +#include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_list.h" diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc index f1e648e..c89b1ae 100644 --- a/chrome/browser/geolocation/geolocation_browsertest.cc +++ b/chrome/browser/geolocation/geolocation_browsertest.cc @@ -3,7 +3,9 @@ // found in the LICENSE file. #include "base/compiler_specific.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/app_modal_dialog.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_list.h" diff --git a/chrome/browser/geolocation/geolocation_permission_context.cc b/chrome/browser/geolocation/geolocation_permission_context.cc index e16a0f6..52689e486 100644 --- a/chrome/browser/geolocation/geolocation_permission_context.cc +++ b/chrome/browser/geolocation/geolocation_permission_context.cc @@ -6,6 +6,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/browser.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/extensions/extensions_service.h" diff --git a/chrome/browser/importer/importer_bridge.cc b/chrome/browser/importer/importer_bridge.cc index 9034305..5ab94da 100644 --- a/chrome/browser/importer/importer_bridge.cc +++ b/chrome/browser/importer/importer_bridge.cc @@ -6,6 +6,7 @@ #include "app/l10n_util.h" #include "base/scoped_ptr.h" +#include "base/string_number_conversions.h" #include "base/string16.h" #include "base/utf_string_conversions.h" #include "base/values.h" diff --git a/chrome/browser/importer/importer_messages.h b/chrome/browser/importer/importer_messages.h index ca52e85..fd7b1dc 100644 --- a/chrome/browser/importer/importer_messages.h +++ b/chrome/browser/importer/importer_messages.h @@ -50,18 +50,18 @@ struct ParamTraits<importer::ProfileInfo> { return true; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.description, l); - l->append(L", "); + l->append(", "); LogParam(static_cast<int>(p.browser_type), l); - l->append(L", "); + l->append(", "); LogParam(p.source_path, l); - l->append(L", "); + l->append(", "); LogParam(p.app_path, l); - l->append(L", "); + l->append(", "); LogParam(static_cast<int>(p.services_supported), l); - l->append(L")"); + l->append(")"); } }; // ParamTraits<importer::ProfileInfo> @@ -105,24 +105,24 @@ struct ParamTraits<history::URLRow> { p->set_favicon_id(favicon_id); return true; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.id(), l); - l->append(L", "); + l->append(", "); LogParam(p.url(), l); - l->append(L", "); + l->append(", "); LogParam(p.title(), l); - l->append(L", "); + l->append(", "); LogParam(p.visit_count(), l); - l->append(L", "); + l->append(", "); LogParam(p.typed_count(), l); - l->append(L", "); + l->append(", "); LogParam(p.last_visit(), l); - l->append(L", "); + l->append(", "); LogParam(p.hidden(), l); - l->append(L", "); + l->append(", "); LogParam(p.favicon_id(), l); - l->append(L")"); + l->append(")"); } }; // ParamTraits<history::URLRow> @@ -145,18 +145,18 @@ struct ParamTraits<ProfileWriter::BookmarkEntry> { (ReadParam(m, iter, &p->title)) && (ReadParam(m, iter, &p->creation_time)); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.in_toolbar, l); - l->append(L", "); + l->append(", "); LogParam(p.url, l); - l->append(L", "); + l->append(", "); LogParam(p.path, l); - l->append(L", "); + l->append(", "); LogParam(p.title, l); - l->append(L", "); + l->append(", "); LogParam(p.creation_time, l); - l->append(L")"); + l->append(")"); } }; // ParamTraits<ProfileWriter::BookmarkEntry> @@ -175,14 +175,14 @@ struct ParamTraits<history::ImportedFavIconUsage> { ReadParam(m, iter, &p->png_data) && ReadParam(m, iter, &p->urls); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.favicon_url, l); - l->append(L", "); + l->append(", "); LogParam(p.png_data, l); - l->append(L", "); + l->append(", "); LogParam(p.urls, l); - l->append(L")"); + l->append(")"); } }; // ParamTraits<history::ImportedFavIconUsage @@ -206,8 +206,8 @@ struct ParamTraits<TemplateURLRef> { *p = TemplateURLRef(url, index_offset, page_offset); return true; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<TemplateURLRef>"); + static void Log(const param_type& p, std::string* l) { + l->append("<TemplateURLRef>"); } }; @@ -234,8 +234,8 @@ struct ParamTraits<TemplateURL::ImageRef> { *p = TemplateURL::ImageRef(type, width, height, url); // here in return true; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<TemplateURL::ImageRef>"); + static void Log(const param_type& p, std::string* l) { + l->append("<TemplateURL::ImageRef>"); } }; @@ -356,8 +356,8 @@ struct ParamTraits<TemplateURL> { p->set_prepopulate_id(prepopulate_id); return true; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<TemplateURL>"); + static void Log(const param_type& p, std::string* l) { + l->append("<TemplateURL>"); } }; diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc index 1daecfb..a3bd281 100644 --- a/chrome/browser/printing/print_view_manager.cc +++ b/chrome/browser/printing/print_view_manager.cc @@ -6,6 +6,7 @@ #include "app/l10n_util.h" #include "base/scoped_ptr.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/printing/print_job.h" #include "chrome/browser/printing/print_job_manager.h" diff --git a/chrome/browser/renderer_host/gtk_im_context_wrapper.cc b/chrome/browser/renderer_host/gtk_im_context_wrapper.cc index e83345b..7fd40ec 100644 --- a/chrome/browser/renderer_host/gtk_im_context_wrapper.cc +++ b/chrome/browser/renderer_host/gtk_im_context_wrapper.cc @@ -14,6 +14,7 @@ #include "base/logging.h" #include "base/string_util.h" #include "base/third_party/icu/icu_utf.h" +#include "base/utf_string_conversions.h" #include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/gtk/gtk_util.h" #if !defined(TOOLKIT_VIEWS) diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc index 5b9de43..2b4b6d5 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc @@ -27,6 +27,7 @@ #include "base/string_number_conversions.h" #include "base/task.h" #include "base/time.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/renderer_host/backing_store_x.h" #include "chrome/browser/renderer_host/gpu_view_host.h" diff --git a/chrome/browser/sync/sync_setup_wizard_unittest.cc b/chrome/browser/sync/sync_setup_wizard_unittest.cc index cbced31..0d64385 100644 --- a/chrome/browser/sync/sync_setup_wizard_unittest.cc +++ b/chrome/browser/sync/sync_setup_wizard_unittest.cc @@ -7,6 +7,7 @@ #include "base/json/json_writer.h" #include "base/scoped_ptr.h" #include "base/stl_util-inl.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/google_service_auth_error.h" diff --git a/chrome/browser/tab_contents/navigation_controller.cc b/chrome/browser/tab_contents/navigation_controller.cc index 1b2f117..1d63c3b 100644 --- a/chrome/browser/tab_contents/navigation_controller.cc +++ b/chrome/browser/tab_contents/navigation_controller.cc @@ -8,6 +8,7 @@ #include "base/logging.h" #include "base/string_util.h" #include "base/time.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/browser_about_handler.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_url_handler.h" diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc index 88afe90..6ce87f1 100644 --- a/chrome/browser/tabs/tab_strip_model_unittest.cc +++ b/chrome/browser/tabs/tab_strip_model_unittest.cc @@ -9,7 +9,9 @@ #include "base/scoped_ptr.h" #include "base/string_util.h" #include "base/stl_util-inl.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/defaults.h" #include "chrome/browser/dom_ui/new_tab_ui.h" #include "chrome/browser/profile.h" diff --git a/chrome/browser/views/about_ipc_dialog.cc b/chrome/browser/views/about_ipc_dialog.cc index 9b83e7d..a23b122 100644 --- a/chrome/browser/views/about_ipc_dialog.cc +++ b/chrome/browser/views/about_ipc_dialog.cc @@ -100,13 +100,14 @@ void CreateColumn(uint32 start, uint32 end, HWND hwnd, control_ptr->InsertColumn(0, L"id", LVCFMT_LEFT, 230); for (uint32 i = start; i < end; i++) { - std::wstring name; + std::string name; IPC::Logging::GetMessageText(i, &name, NULL, NULL); + std::wstring wname = UTF8ToWide(name); int index = control_ptr->InsertItem( - LVIF_TEXT | LVIF_PARAM, 0, name.c_str(), 0, 0, 0, i); + LVIF_TEXT | LVIF_PARAM, 0, wname.c_str(), 0, 0, 0, i); - control_ptr->SetItemText(index, 0, name.c_str()); + control_ptr->SetItemText(index, 0, wname.c_str()); if (disabled_messages.find(i) == disabled_messages.end()) control_ptr->SetCheckState(index, TRUE); @@ -406,10 +407,12 @@ void AboutIPCDialog::Log(const IPC::LogData& data) { message_list_.SetItemText(index, kChannelColumn, ASCIIToWide(data.channel).c_str()); - std::wstring message_name; + std::string message_name; IPC::Logging::GetMessageText(data.type, &message_name, NULL, NULL); - message_list_.SetItemText(index, kMessageColumn, message_name.c_str()); - message_list_.SetItemText(index, kFlagsColumn, data.flags.c_str()); + message_list_.SetItemText(index, kMessageColumn, + UTF8ToWide(message_name).c_str()); + message_list_.SetItemText(index, kFlagsColumn, + UTF8ToWide(data.flags).c_str()); int64 time_to_send = (base::Time::FromInternalValue(data.receive) - sent).InMilliseconds(); @@ -424,7 +427,8 @@ void AboutIPCDialog::Log(const IPC::LogData& data) { temp = StringPrintf(L"%d", time_to_process); message_list_.SetItemText(index, kProcessColumn, temp.c_str()); - message_list_.SetItemText(index, kParamsColumn, data.params.c_str()); + message_list_.SetItemText(index, kParamsColumn, + UTF8ToWide(data.params).c_str()); message_list_.EnsureVisible(index, FALSE); } diff --git a/chrome/common/common_param_traits.cc b/chrome/common/common_param_traits.cc index d6eb2cc..0eed189 100644 --- a/chrome/common/common_param_traits.cc +++ b/chrome/common/common_param_traits.cc @@ -93,8 +93,8 @@ bool ParamTraits<SkBitmap>::Read(const Message* m, void** iter, SkBitmap* r) { return bmp_data->InitSkBitmapFromData(r, variable_data, variable_data_size); } -void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::wstring* l) { - l->append(StringPrintf(L"<SkBitmap>")); +void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::string* l) { + l->append("<SkBitmap>"); } #endif // EXCLUDE_SKIA_DEPENDENCIES @@ -114,8 +114,8 @@ bool ParamTraits<GURL>::Read(const Message* m, void** iter, GURL* p) { return true; } -void ParamTraits<GURL>::Log(const GURL& p, std::wstring* l) { - l->append(UTF8ToWide(p.spec())); +void ParamTraits<GURL>::Log(const GURL& p, std::string* l) { + l->append(p.spec()); } void ParamTraits<gfx::Point>::Write(Message* m, const gfx::Point& p) { @@ -134,8 +134,8 @@ bool ParamTraits<gfx::Point>::Read(const Message* m, void** iter, return true; } -void ParamTraits<gfx::Point>::Log(const gfx::Point& p, std::wstring* l) { - l->append(StringPrintf(L"(%d, %d)", p.x(), p.y())); +void ParamTraits<gfx::Point>::Log(const gfx::Point& p, std::string* l) { + l->append(StringPrintf("(%d, %d)", p.x(), p.y())); } @@ -160,8 +160,8 @@ bool ParamTraits<gfx::Rect>::Read(const Message* m, void** iter, gfx::Rect* r) { return true; } -void ParamTraits<gfx::Rect>::Log(const gfx::Rect& p, std::wstring* l) { - l->append(StringPrintf(L"(%d, %d, %d, %d)", p.x(), p.y(), +void ParamTraits<gfx::Rect>::Log(const gfx::Rect& p, std::string* l) { + l->append(StringPrintf("(%d, %d, %d, %d)", p.x(), p.y(), p.width(), p.height())); } @@ -181,8 +181,8 @@ bool ParamTraits<gfx::Size>::Read(const Message* m, void** iter, gfx::Size* r) { return true; } -void ParamTraits<gfx::Size>::Log(const gfx::Size& p, std::wstring* l) { - l->append(StringPrintf(L"(%d, %d)", p.width(), p.height())); +void ParamTraits<gfx::Size>::Log(const gfx::Size& p, std::string* l) { + l->append(StringPrintf("(%d, %d)", p.width(), p.height())); } void ParamTraits<ContentSetting>::Write(Message* m, const param_type& p) { @@ -200,7 +200,7 @@ bool ParamTraits<ContentSetting>::Read(const Message* m, void** iter, return true; } -void ParamTraits<ContentSetting>::Log(const param_type& p, std::wstring* l) { +void ParamTraits<ContentSetting>::Log(const param_type& p, std::string* l) { LogParam(static_cast<int>(p), l); } @@ -220,8 +220,8 @@ bool ParamTraits<ContentSettings>::Read( } void ParamTraits<ContentSettings>::Log( - const ContentSettings& p, std::wstring* l) { - l->append(StringPrintf(L"<ContentSettings>")); + const ContentSettings& p, std::string* l) { + l->append("<ContentSettings>"); } void ParamTraits<webkit_glue::WebApplicationInfo>::Write( @@ -261,8 +261,8 @@ bool ParamTraits<webkit_glue::WebApplicationInfo>::Read( } void ParamTraits<webkit_glue::WebApplicationInfo>::Log( - const webkit_glue::WebApplicationInfo& p, std::wstring* l) { - l->append(L"<WebApplicationInfo>"); + const webkit_glue::WebApplicationInfo& p, std::string* l) { + l->append("<WebApplicationInfo>"); } void ParamTraits<URLRequestStatus>::Write(Message* m, const param_type& p) { @@ -281,37 +281,37 @@ bool ParamTraits<URLRequestStatus>::Read(const Message* m, void** iter, return true; } -void ParamTraits<URLRequestStatus>::Log(const param_type& p, std::wstring* l) { - std::wstring status; +void ParamTraits<URLRequestStatus>::Log(const param_type& p, std::string* l) { + std::string status; switch (p.status()) { case URLRequestStatus::SUCCESS: - status = L"SUCCESS"; + status = "SUCCESS"; break; case URLRequestStatus::IO_PENDING: - status = L"IO_PENDING "; + status = "IO_PENDING "; break; case URLRequestStatus::HANDLED_EXTERNALLY: - status = L"HANDLED_EXTERNALLY"; + status = "HANDLED_EXTERNALLY"; break; case URLRequestStatus::CANCELED: - status = L"CANCELED"; + status = "CANCELED"; break; case URLRequestStatus::FAILED: - status = L"FAILED"; + status = "FAILED"; break; default: - status = L"UNKNOWN"; + status = "UNKNOWN"; break; } if (p.status() == URLRequestStatus::FAILED) - l->append(L"("); + l->append("("); LogParam(status, l); if (p.status() == URLRequestStatus::FAILED) { - l->append(L", "); + l->append(", "); LogParam(p.os_error(), l); - l->append(L")"); + l->append(")"); } } @@ -340,8 +340,8 @@ bool ParamTraits<ThumbnailScore>::Read(const Message* m, void** iter, return true; } -void ParamTraits<ThumbnailScore>::Log(const param_type& p, std::wstring* l) { - l->append(StringPrintf(L"(%f, %d, %d)", +void ParamTraits<ThumbnailScore>::Log(const param_type& p, std::string* l) { + l->append(StringPrintf("(%f, %d, %d)", p.boring_score, p.good_clipping, p.at_top)); } @@ -360,9 +360,9 @@ bool ParamTraits<Geoposition::ErrorCode>::Read( } void ParamTraits<Geoposition::ErrorCode>::Log( - const Geoposition::ErrorCode& p, std::wstring* l) { + const Geoposition::ErrorCode& p, std::string* l) { int error_code = p; - l->append(StringPrintf(L"<Geoposition::ErrorCode>%d", error_code)); + l->append(StringPrintf("<Geoposition::ErrorCode>%d", error_code)); } void ParamTraits<Geoposition>::Write(Message* m, const Geoposition& p) { @@ -393,17 +393,17 @@ bool ParamTraits<Geoposition>::Read( return ret; } -void ParamTraits<Geoposition>::Log(const Geoposition& p, std::wstring* l) { +void ParamTraits<Geoposition>::Log(const Geoposition& p, std::string* l) { l->append( StringPrintf( - L"<Geoposition>" - L"%.6f %.6f %.6f %.6f " - L"%.6f %.6f %.6f ", + "<Geoposition>" + "%.6f %.6f %.6f %.6f " + "%.6f %.6f %.6f ", p.latitude, p.longitude, p.accuracy, p.altitude, p.altitude_accuracy, p.speed, p.heading)); LogParam(p.timestamp, l); - l->append(L" "); - l->append(UTF8ToWide(p.error_message)); + l->append(" "); + l->append(p.error_message); LogParam(p.error_code, l); } @@ -442,8 +442,8 @@ bool ParamTraits<webkit_glue::PasswordForm>::Read(const Message* m, void** iter, ReadParam(m, iter, &p->blacklisted_by_user); } void ParamTraits<webkit_glue::PasswordForm>::Log(const param_type& p, - std::wstring* l) { - l->append(L"<PasswordForm>"); + std::string* l) { + l->append("<PasswordForm>"); } void ParamTraits<printing::PageRange>::Write(Message* m, const param_type& p) { @@ -458,12 +458,12 @@ bool ParamTraits<printing::PageRange>::Read( } void ParamTraits<printing::PageRange>::Log( - const param_type& p, std::wstring* l) { - l->append(L"("); + const param_type& p, std::string* l) { + l->append("("); LogParam(p.to, l); - l->append(L", "); + l->append(", "); LogParam(p.from, l); - l->append(L")"); + l->append(")"); } void ParamTraits<printing::NativeMetafile>::Write( @@ -490,8 +490,8 @@ bool ParamTraits<printing::NativeMetafile>::Read( } void ParamTraits<printing::NativeMetafile>::Log( - const param_type& p, std::wstring* l) { - l->append(StringPrintf(L"<printing::NativeMetafile>")); + const param_type& p, std::string* l) { + l->append("<printing::NativeMetafile>"); } } // namespace IPC diff --git a/chrome/common/common_param_traits.h b/chrome/common/common_param_traits.h index 4df6536..7345487 100644 --- a/chrome/common/common_param_traits.h +++ b/chrome/common/common_param_traits.h @@ -61,7 +61,7 @@ struct ParamTraits<SkBitmap> { // r->SetConfig() and r->SetPixels() are called. static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; @@ -70,7 +70,7 @@ struct ParamTraits<GURL> { typedef GURL param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; @@ -79,7 +79,7 @@ struct ParamTraits<gfx::Point> { typedef gfx::Point param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -87,7 +87,7 @@ struct ParamTraits<gfx::Rect> { typedef gfx::Rect param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -95,7 +95,7 @@ struct ParamTraits<gfx::Size> { typedef gfx::Size param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -103,7 +103,7 @@ struct ParamTraits<ContentSetting> { typedef ContentSetting param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -121,7 +121,7 @@ struct ParamTraits<ContentSettingsType> { *r = static_cast<param_type>(value); return true; } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { LogParam(static_cast<int>(p), l); } }; @@ -131,7 +131,7 @@ struct ParamTraits<ContentSettings> { typedef ContentSettings param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -161,8 +161,8 @@ struct ParamTraits<gfx::NativeWindow> { return result; #endif } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<gfx::NativeWindow>"); + static void Log(const param_type& p, std::string* l) { + l->append("<gfx::NativeWindow>"); } }; @@ -179,7 +179,7 @@ struct ParamTraits<PageZoom::Function> { *r = static_cast<param_type>(value); return true; } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { LogParam(static_cast<int>(p), l); } }; @@ -198,7 +198,7 @@ struct ParamTraits<WindowOpenDisposition> { *r = static_cast<param_type>(value); return true; } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { LogParam(static_cast<int>(p), l); } }; @@ -213,8 +213,8 @@ struct ParamTraits<WebCursor> { static bool Read(const Message* m, void** iter, param_type* r) { return r->Deserialize(m, iter); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<WebCursor>"); + static void Log(const param_type& p, std::string* l) { + l->append("<WebCursor>"); } }; @@ -224,7 +224,7 @@ struct ParamTraits<webkit_glue::WebApplicationInfo> { typedef webkit_glue::WebApplicationInfo param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; @@ -240,12 +240,12 @@ struct ParamTraits<TransportDIB::Id> { return (ReadParam(m, iter, &r->handle) && ReadParam(m, iter, &r->sequence_num)); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"TransportDIB("); + static void Log(const param_type& p, std::string* l) { + l->append("TransportDIB("); LogParam(p.handle, l); - l->append(L", "); + l->append(", "); LogParam(p.sequence_num, l); - l->append(L")"); + l->append(")"); } }; #endif @@ -256,7 +256,7 @@ struct ParamTraits<URLRequestStatus> { typedef URLRequestStatus param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; @@ -303,8 +303,8 @@ struct ParamTraits<net::UploadData::Element> { } return true; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<net::UploadData::Element>"); + static void Log(const param_type& p, std::string* l) { + l->append("<net::UploadData::Element>"); } }; @@ -336,8 +336,8 @@ struct ParamTraits<scoped_refptr<net::UploadData> > { (*r)->set_identifier(identifier); return true; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<net::UploadData>"); + static void Log(const param_type& p, std::string* l) { + l->append("<net::UploadData>"); } }; @@ -346,7 +346,7 @@ struct ParamTraits<ThumbnailScore> { typedef ThumbnailScore param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -354,7 +354,7 @@ struct ParamTraits<Geoposition> { typedef Geoposition param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -362,7 +362,7 @@ struct ParamTraits<Geoposition::ErrorCode> { typedef Geoposition::ErrorCode param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -370,7 +370,7 @@ struct ParamTraits<webkit_glue::PasswordForm> { typedef webkit_glue::PasswordForm param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -378,7 +378,7 @@ struct ParamTraits<printing::PageRange> { typedef printing::PageRange param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -386,7 +386,7 @@ struct ParamTraits<printing::NativeMetafile> { typedef printing::NativeMetafile param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; } // namespace IPC diff --git a/chrome/common/common_param_traits_unittest.cc b/chrome/common/common_param_traits_unittest.cc index 37b846c..a810991 100644 --- a/chrome/common/common_param_traits_unittest.cc +++ b/chrome/common/common_param_traits_unittest.cc @@ -207,13 +207,13 @@ TEST(IPCMessageTest, Geoposition) { EXPECT_EQ(input.error_code, output.error_code); EXPECT_EQ(input.error_message, output.error_message); - std::wstring log_message; + std::string log_message; IPC::LogParam(output, &log_message); - EXPECT_STREQ(L"<Geoposition>" - L"0.100000 51.300000 13.700000 42.240000 " - L"9.300000 55.000000 120.000000 " - L"1977 unittest error message for geoposition" - L"<Geoposition::ErrorCode>2", + EXPECT_STREQ("<Geoposition>" + "0.100000 51.300000 13.700000 42.240000 " + "9.300000 55.000000 120.000000 " + "1977 unittest error message for geoposition" + "<Geoposition::ErrorCode>2", log_message.c_str()); } diff --git a/chrome/common/gpu_messages.h b/chrome/common/gpu_messages.h index ef143f8..63c864e 100644 --- a/chrome/common/gpu_messages.h +++ b/chrome/common/gpu_messages.h @@ -60,20 +60,20 @@ struct ParamTraits<GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params> { ReadParam(m, iter, &p->height) && ReadParam(m, iter, &p->identifier); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.renderer_id, l); - l->append(L", "); + l->append(", "); LogParam(p.render_view_id, l); - l->append(L", "); + l->append(", "); LogParam(p.window, l); - l->append(L", "); + l->append(", "); LogParam(p.width, l); - l->append(L", "); + l->append(", "); LogParam(p.height, l); - l->append(L", "); + l->append(", "); LogParam(p.identifier, l); - l->append(L")"); + l->append(")"); } }; #endif @@ -103,9 +103,9 @@ struct ParamTraits<GPUInfo> { pixel_shader_version, vertex_shader_version); return ret; } - static void Log(const param_type& p, std::wstring* l) { - l->append(StringPrintf(L"<GPUInfo> %x %x %ls", - p.vendor_id(), p.device_id(), p.driver_version().c_str())); + static void Log(const param_type& p, std::string* l) { + l->append(StringPrintf("<GPUInfo> %x %x %ls", + p.vendor_id(), p.device_id(), p.driver_version().c_str())); } }; @@ -132,8 +132,8 @@ struct ParamTraits<gpu::CommandBuffer::State> { return false; } } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<CommandBuffer::State>"); + static void Log(const param_type& p, std::string* l) { + l->append("<CommandBuffer::State>"); } }; } // namespace IPC diff --git a/chrome/common/gpu_messages_unittest.cc b/chrome/common/gpu_messages_unittest.cc index 5215949..a22112b 100644 --- a/chrome/common/gpu_messages_unittest.cc +++ b/chrome/common/gpu_messages_unittest.cc @@ -29,7 +29,7 @@ TEST(GPUIPCMessageTest, GPUInfo) { EXPECT_EQ(input.pixel_shader_version(), output.pixel_shader_version()); EXPECT_EQ(input.vertex_shader_version(), output.vertex_shader_version()); - std::wstring log_message; + std::string log_message; IPC::LogParam(output, &log_message); - EXPECT_STREQ(L"<GPUInfo> 10de 429 6.14.11.7715", log_message.c_str()); + EXPECT_STREQ("<GPUInfo> 10de 429 6.14.11.7715", log_message.c_str()); } diff --git a/chrome/common/gpu_video_common.cc b/chrome/common/gpu_video_common.cc index 06116f9..9732c33 100644 --- a/chrome/common/gpu_video_common.cc +++ b/chrome/common/gpu_video_common.cc @@ -23,8 +23,8 @@ bool ParamTraits<GpuVideoServiceInfoParam>::Read( } void ParamTraits<GpuVideoServiceInfoParam>::Log( - const GpuVideoServiceInfoParam& p, std::wstring* l) { - l->append(StringPrintf(L"(%d, %d, %d)", + const GpuVideoServiceInfoParam& p, std::string* l) { + l->append(StringPrintf("(%d, %d, %d)", p.video_service_route_id_, p.video_service_host_route_id_, p.service_available_)); @@ -49,8 +49,8 @@ bool ParamTraits<GpuVideoDecoderInfoParam>::Read( } void ParamTraits<GpuVideoDecoderInfoParam>::Log( - const GpuVideoDecoderInfoParam& p, std::wstring* l) { - l->append(StringPrintf(L"(%d, %d, %d)", + const GpuVideoDecoderInfoParam& p, std::string* l) { + l->append(StringPrintf("(%d, %d, %d)", p.decoder_id_, p.decoder_route_id_, p.decoder_host_route_id_)); @@ -75,8 +75,8 @@ bool ParamTraits<GpuVideoDecoderInitParam>::Read( } void ParamTraits<GpuVideoDecoderInitParam>::Log( - const GpuVideoDecoderInitParam& p, std::wstring* l) { - l->append(StringPrintf(L"(%d, %d %d)", p.codec_id_, p.width_, p.height_)); + const GpuVideoDecoderInitParam& p, std::string* l) { + l->append(StringPrintf("(%d, %d %d)", p.codec_id_, p.width_, p.height_)); } /////////////////////////////////////////////////////////////////////////////// @@ -112,8 +112,8 @@ bool ParamTraits<GpuVideoDecoderInitDoneParam>::Read( } void ParamTraits<GpuVideoDecoderInitDoneParam>::Log( - const GpuVideoDecoderInitDoneParam& p, std::wstring* l) { - l->append(StringPrintf(L"(%d)", p.stride_)); + const GpuVideoDecoderInitDoneParam& p, std::string* l) { + l->append(StringPrintf("(%d)", p.stride_)); } /////////////////////////////////////////////////////////////////////////////// @@ -135,8 +135,8 @@ bool ParamTraits<GpuVideoDecoderInputBufferParam>::Read( } void ParamTraits<GpuVideoDecoderInputBufferParam>::Log( - const GpuVideoDecoderInputBufferParam& p, std::wstring* l) { - l->append(StringPrintf(L"(%d %d %d)", + const GpuVideoDecoderInputBufferParam& p, std::string* l) { + l->append(StringPrintf("(%d %d %d)", static_cast<int>(p.timestamp_), p.offset_, p.size_)); } @@ -160,8 +160,8 @@ bool ParamTraits<GpuVideoDecoderOutputBufferParam>::Read( } void ParamTraits<GpuVideoDecoderOutputBufferParam>::Log( - const GpuVideoDecoderOutputBufferParam& p, std::wstring* l) { - l->append(StringPrintf(L"(%d %d) %x", + const GpuVideoDecoderOutputBufferParam& p, std::string* l) { + l->append(StringPrintf("(%d %d) %x", static_cast<int>(p.timestamp_), static_cast<int>(p.duration_), p.flags_)); @@ -182,8 +182,8 @@ bool ParamTraits<GpuVideoDecoderErrorInfoParam>::Read( } void ParamTraits<GpuVideoDecoderErrorInfoParam>::Log( - const GpuVideoDecoderErrorInfoParam& p, std::wstring* l) { - l->append(StringPrintf(L"(%d)", p.error_id)); + const GpuVideoDecoderErrorInfoParam& p, std::string* l) { + l->append(StringPrintf("(%d)", p.error_id)); } /////////////////////////////////////////////////////////////////////////////// @@ -203,8 +203,8 @@ bool ParamTraits<GpuVideoDecoderFormatChangeParam>::Read( } void ParamTraits<GpuVideoDecoderFormatChangeParam>::Log( - const GpuVideoDecoderFormatChangeParam& p, std::wstring* l) { - l->append(StringPrintf(L"(%d %d)", p.input_buffer_size_, + const GpuVideoDecoderFormatChangeParam& p, std::string* l) { + l->append(StringPrintf("(%d %d)", p.input_buffer_size_, p.output_buffer_size_)); } }; diff --git a/chrome/common/gpu_video_common.h b/chrome/common/gpu_video_common.h index 65fb1e4..f1d71dd 100644 --- a/chrome/common/gpu_video_common.h +++ b/chrome/common/gpu_video_common.h @@ -108,7 +108,7 @@ struct ParamTraits<GpuVideoServiceInfoParam> { typedef GpuVideoServiceInfoParam param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -116,7 +116,7 @@ struct ParamTraits<GpuVideoDecoderInfoParam> { typedef GpuVideoDecoderInfoParam param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -124,7 +124,7 @@ struct ParamTraits<GpuVideoDecoderInitParam> { typedef GpuVideoDecoderInitParam param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -132,7 +132,7 @@ struct ParamTraits<GpuVideoDecoderInitDoneParam> { typedef GpuVideoDecoderInitDoneParam param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -140,7 +140,7 @@ struct ParamTraits<GpuVideoDecoderInputBufferParam> { typedef GpuVideoDecoderInputBufferParam param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -148,7 +148,7 @@ struct ParamTraits<GpuVideoDecoderOutputBufferParam> { typedef GpuVideoDecoderOutputBufferParam param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -156,7 +156,7 @@ struct ParamTraits<GpuVideoDecoderErrorInfoParam> { typedef GpuVideoDecoderErrorInfoParam param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -164,7 +164,7 @@ struct ParamTraits<GpuVideoDecoderFormatChangeParam> { typedef GpuVideoDecoderFormatChangeParam param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; }; diff --git a/chrome/common/indexed_db_param_traits.h b/chrome/common/indexed_db_param_traits.h index 11d2050..f7a8f0d 100644 --- a/chrome/common/indexed_db_param_traits.h +++ b/chrome/common/indexed_db_param_traits.h @@ -39,14 +39,14 @@ struct ParamTraits<SerializedScriptValue> { r->set_data(data); return true; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<SerializedScriptValue>("); + static void Log(const param_type& p, std::string* l) { + l->append("<SerializedScriptValue>("); LogParam(p.is_null(), l); - l->append(L", "); + l->append(", "); LogParam(p.is_invalid(), l); - l->append(L", "); + l->append(", "); LogParam(p.data(), l); - l->append(L")"); + l->append(")"); } }; @@ -86,14 +86,14 @@ struct ParamTraits<IndexedDBKey> { NOTREACHED(); return false; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<IndexedDBKey>("); + static void Log(const param_type& p, std::string* l) { + l->append("<IndexedDBKey>("); LogParam(int(p.type()), l); - l->append(L", "); + l->append(", "); LogParam(p.string(), l); - l->append(L", "); + l->append(", "); LogParam(p.number(), l); - l->append(L")"); + l->append(")"); } }; diff --git a/chrome/common/plugin_messages.h b/chrome/common/plugin_messages.h index 3cf8739..190fdba 100644 --- a/chrome/common/plugin_messages.h +++ b/chrome/common/plugin_messages.h @@ -150,30 +150,30 @@ struct ParamTraits<PluginMsg_Init_Params> { #endif ; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.containing_window, l); - l->append(L", "); + l->append(", "); LogParam(p.url, l); - l->append(L", "); + l->append(", "); LogParam(p.page_url, l); - l->append(L", "); + l->append(", "); LogParam(p.arg_names, l); - l->append(L", "); + l->append(", "); LogParam(p.arg_values, l); - l->append(L", "); + l->append(", "); LogParam(p.load_manually, l); - l->append(L", "); + l->append(", "); LogParam(p.host_render_view_routing_id, l); #if defined(OS_MACOSX) - l->append(L", "); + l->append(", "); LogParam(p.containing_window_frame, l); - l->append(L", "); + l->append(", "); LogParam(p.containing_content_frame, l); - l->append(L", "); + l->append(", "); LogParam(p.containing_window_has_focus, l); #endif - l->append(L")"); + l->append(")"); } }; @@ -197,20 +197,20 @@ struct ParamTraits<PluginHostMsg_URLRequest_Params> { ReadParam(m, iter, &p->notify_id) && ReadParam(m, iter, &p->popups_allowed); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.url, l); - l->append(L", "); + l->append(", "); LogParam(p.method, l); - l->append(L", "); + l->append(", "); LogParam(p.target, l); - l->append(L", "); + l->append(", "); LogParam(p.buffer, l); - l->append(L", "); + l->append(", "); LogParam(p.notify_id, l); - l->append(L", "); + l->append(", "); LogParam(p.popups_allowed, l); - l->append(L")"); + l->append(")"); } }; @@ -234,20 +234,20 @@ struct ParamTraits<PluginMsg_DidReceiveResponseParams> { ReadParam(m, iter, &r->last_modified) && ReadParam(m, iter, &r->request_is_seekable); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.id, l); - l->append(L", "); + l->append(", "); LogParam(p.mime_type, l); - l->append(L", "); + l->append(", "); LogParam(p.headers, l); - l->append(L", "); + l->append(", "); LogParam(p.expected_length, l); - l->append(L", "); + l->append(", "); LogParam(p.last_modified, l); - l->append(L", "); + l->append(", "); LogParam(p.request_is_seekable, l); - l->append(L")"); + l->append(")"); } }; @@ -280,14 +280,14 @@ struct ParamTraits<WebInputEventPointer> { *r = event; return true; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p->size, l); - l->append(L", "); + l->append(", "); LogParam(p->type, l); - l->append(L", "); + l->append(", "); LogParam(p->timeStampSeconds, l); - l->append(L")"); + l->append(")"); } }; @@ -300,14 +300,14 @@ struct ParamTraits<NPIdentifier_Param> { static bool Read(const Message* m, void** iter, param_type* r) { return webkit_glue::DeserializeNPIdentifier(*m, iter, &r->identifier); } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { if (WebKit::WebBindings::identifierIsString(p.identifier)) { NPUTF8* str = WebKit::WebBindings::utf8FromIdentifier(p.identifier); - l->append(UTF8ToWide(str)); + l->append(str); NPN_MemFree(str); } else { - l->append(UTF8ToWide(base::IntToString( - WebKit::WebBindings::intFromIdentifier(p.identifier)))); + l->append(base::IntToString( + WebKit::WebBindings::intFromIdentifier(p.identifier))); } } }; @@ -362,7 +362,7 @@ struct ParamTraits<NPVariant_Param> { return result; } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { if (p.type == NPVARIANT_PARAM_BOOL) { LogParam(p.bool_value, l); } else if (p.type == NPVARIANT_PARAM_INT) { @@ -408,22 +408,22 @@ struct ParamTraits<PluginMsg_UpdateGeometry_Param> { #endif ; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.window_rect, l); - l->append(L", "); + l->append(", "); LogParam(p.clip_rect, l); - l->append(L", "); + l->append(", "); LogParam(p.windowless_buffer, l); - l->append(L", "); + l->append(", "); LogParam(p.background_buffer, l); - l->append(L", "); + l->append(", "); LogParam(p.transparent, l); #if defined(OS_MACOSX) - l->append(L", "); + l->append(", "); LogParam(p.ack_key, l); #endif - l->append(L")"); + l->append(")"); } }; diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc index cb13959..1c60413 100644 --- a/chrome/common/render_messages.cc +++ b/chrome/common/render_messages.cc @@ -68,20 +68,20 @@ bool ParamTraits<ViewMsg_Navigate_Params>::Read(const Message* m, void** iter, } void ParamTraits<ViewMsg_Navigate_Params>::Log(const param_type& p, - std::wstring* l) { - l->append(L"("); + std::string* l) { + l->append("("); LogParam(p.page_id, l); - l->append(L", "); + l->append(", "); LogParam(p.url, l); - l->append(L", "); + l->append(", "); LogParam(p.transition, l); - l->append(L", "); + l->append(", "); LogParam(p.state, l); - l->append(L", "); + l->append(", "); LogParam(p.navigation_type, l); - l->append(L", "); + l->append(", "); LogParam(p.request_time, l); - l->append(L")"); + l->append(")"); } void ParamTraits<webkit_glue::FormField>::Write(Message* m, @@ -118,8 +118,8 @@ bool ParamTraits<webkit_glue::FormField>::Read(const Message* m, void** iter, } void ParamTraits<webkit_glue::FormField>::Log(const param_type& p, - std::wstring* l) { - l->append(L"<FormField>"); + std::string* l) { + l->append("<FormField>"); } void ParamTraits<ContextMenuParams>::Write(Message* m, const param_type& p) { @@ -179,8 +179,8 @@ bool ParamTraits<ContextMenuParams>::Read(const Message* m, void** iter, } void ParamTraits<ContextMenuParams>::Log(const param_type& p, - std::wstring* l) { - l->append(L"<ContextMenuParams>"); + std::string* l) { + l->append("<ContextMenuParams>"); } void ParamTraits<ViewHostMsg_UpdateRect_Params>::Write( @@ -211,26 +211,26 @@ bool ParamTraits<ViewHostMsg_UpdateRect_Params>::Read( } void ParamTraits<ViewHostMsg_UpdateRect_Params>::Log(const param_type& p, - std::wstring* l) { - l->append(L"("); + std::string* l) { + l->append("("); LogParam(p.bitmap, l); - l->append(L", "); + l->append(", "); LogParam(p.bitmap_rect, l); - l->append(L", "); + l->append(", "); LogParam(p.dx, l); - l->append(L", "); + l->append(", "); LogParam(p.dy, l); - l->append(L", "); + l->append(", "); LogParam(p.scroll_rect, l); - l->append(L", "); + l->append(", "); LogParam(p.copy_rects, l); - l->append(L", "); + l->append(", "); LogParam(p.view_size, l); - l->append(L", "); + l->append(", "); LogParam(p.plugin_window_moves, l); - l->append(L", "); + l->append(", "); LogParam(p.flags, l); - l->append(L")"); + l->append(")"); } void ParamTraits<webkit_glue::WebPluginGeometry>::Write(Message* m, @@ -255,20 +255,20 @@ bool ParamTraits<webkit_glue::WebPluginGeometry>::Read( } void ParamTraits<webkit_glue::WebPluginGeometry>::Log(const param_type& p, - std::wstring* l) { - l->append(L"("); + std::string* l) { + l->append("("); LogParam(p.window, l); - l->append(L", "); + l->append(", "); LogParam(p.window_rect, l); - l->append(L", "); + l->append(", "); LogParam(p.clip_rect, l); - l->append(L", "); + l->append(", "); LogParam(p.cutout_rects, l); - l->append(L", "); + l->append(", "); LogParam(p.rects_valid, l); - l->append(L", "); + l->append(", "); LogParam(p.visible, l); - l->append(L")"); + l->append(")"); } void ParamTraits<WebPluginMimeType>::Write(Message* m, const param_type& p) { @@ -285,14 +285,14 @@ bool ParamTraits<WebPluginMimeType>::Read(const Message* m, void** iter, ReadParam(m, iter, &r->description); } -void ParamTraits<WebPluginMimeType>::Log(const param_type& p, std::wstring* l) { - l->append(L"("); +void ParamTraits<WebPluginMimeType>::Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.mime_type, l); - l->append(L", "); + l->append(", "); LogParam(p.file_extensions, l); - l->append(L", "); + l->append(", "); LogParam(p.description, l); - l->append(L")"); + l->append(")"); } void ParamTraits<WebPluginInfo>::Write(Message* m, const param_type& p) { @@ -315,21 +315,21 @@ bool ParamTraits<WebPluginInfo>::Read(const Message* m, void** iter, ReadParam(m, iter, &r->enabled); } -void ParamTraits<WebPluginInfo>::Log(const param_type& p, std::wstring* l) { - l->append(L"("); +void ParamTraits<WebPluginInfo>::Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.name, l); - l->append(L", "); - l->append(L", "); + l->append(", "); + l->append(", "); LogParam(p.path, l); - l->append(L", "); + l->append(", "); LogParam(p.version, l); - l->append(L", "); + l->append(", "); LogParam(p.desc, l); - l->append(L", "); + l->append(", "); LogParam(p.mime_types, l); - l->append(L", "); + l->append(", "); LogParam(p.enabled, l); - l->append(L")"); + l->append(")"); } void ParamTraits<webkit_glue::PasswordFormFillData>::Write( @@ -348,8 +348,8 @@ bool ParamTraits<webkit_glue::PasswordFormFillData>::Read( } void ParamTraits<webkit_glue::PasswordFormFillData>::Log(const param_type& p, - std::wstring* l) { - l->append(L"<PasswordFormFillData>"); + std::string* l) { + l->append("<PasswordFormFillData>"); } void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Write( @@ -372,8 +372,8 @@ bool ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Read( } void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Log( - const param_type& p, std::wstring* l) { - l->append(L"<HttpResponseHeaders>"); + const param_type& p, std::string* l) { + l->append("<HttpResponseHeaders>"); } void ParamTraits<webkit_glue::FormData>::Write(Message* m, @@ -398,8 +398,8 @@ bool ParamTraits<webkit_glue::FormData>::Read(const Message* m, void** iter, } void ParamTraits<webkit_glue::FormData>::Log(const param_type& p, - std::wstring* l) { - l->append(L"<FormData>"); + std::string* l) { + l->append("<FormData>"); } void ParamTraits<RendererPreferences>::Write(Message* m, const param_type& p) { @@ -472,8 +472,8 @@ bool ParamTraits<RendererPreferences>::Read(const Message* m, void** iter, } void ParamTraits<RendererPreferences>::Log(const param_type& p, - std::wstring* l) { - l->append(L"<RendererPreferences>"); + std::string* l) { + l->append("<RendererPreferences>"); } void ParamTraits<WebPreferences>::Write(Message* m, const param_type& p) { @@ -570,8 +570,8 @@ bool ParamTraits<WebPreferences>::Read(const Message* m, void** iter, ReadParam(m, iter, &p->memory_info_enabled); } -void ParamTraits<WebPreferences>::Log(const param_type& p, std::wstring* l) { - l->append(L"<WebPreferences>"); +void ParamTraits<WebPreferences>::Log(const param_type& p, std::string* l) { + l->append("<WebPreferences>"); } void ParamTraits<WebDropData>::Write(Message* m, const param_type& p) { @@ -604,8 +604,8 @@ bool ParamTraits<WebDropData>::Read(const Message* m, void** iter, ReadParam(m, iter, &p->file_contents); } -void ParamTraits<WebDropData>::Log(const param_type& p, std::wstring* l) { - l->append(L"<WebDropData>"); +void ParamTraits<WebDropData>::Log(const param_type& p, std::string* l) { + l->append("<WebDropData>"); } void ParamTraits<URLPattern>::Write(Message* m, const param_type& p) { @@ -625,7 +625,7 @@ bool ParamTraits<URLPattern>::Read(const Message* m, void** iter, return p->Parse(spec); } -void ParamTraits<URLPattern>::Log(const param_type& p, std::wstring* l) { +void ParamTraits<URLPattern>::Log(const param_type& p, std::string* l) { LogParam(p.GetAsString(), l); } @@ -639,12 +639,12 @@ bool ParamTraits<EditCommand>::Read(const Message* m, void** iter, return ReadParam(m, iter, &p->name) && ReadParam(m, iter, &p->value); } -void ParamTraits<EditCommand>::Log(const param_type& p, std::wstring* l) { - l->append(L"("); +void ParamTraits<EditCommand>::Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.name, l); - l->append(L":"); + l->append(":"); LogParam(p.value, l); - l->append(L")"); + l->append(")"); } void ParamTraits<webkit_glue::WebCookie>::Write(Message* m, @@ -673,8 +673,8 @@ bool ParamTraits<webkit_glue::WebCookie>::Read(const Message* m, void** iter, } void ParamTraits<webkit_glue::WebCookie>::Log(const param_type& p, - std::wstring* l) { - l->append(L"<WebCookie>"); + std::string* l) { + l->append("<WebCookie>"); } void ParamTraits<ExtensionExtent>::Write(Message* m, const param_type& p) { @@ -694,7 +694,7 @@ bool ParamTraits<ExtensionExtent>::Read(const Message* m, void** iter, return true; } -void ParamTraits<ExtensionExtent>::Log(const param_type& p, std::wstring* l) { +void ParamTraits<ExtensionExtent>::Log(const param_type& p, std::string* l) { LogParam(p.patterns(), l); } @@ -721,22 +721,22 @@ bool ParamTraits<appcache::AppCacheResourceInfo>::Read( } void ParamTraits<appcache::AppCacheResourceInfo>::Log(const param_type& p, - std::wstring* l) { - l->append(L"("); + std::string* l) { + l->append("("); LogParam(p.url, l); - l->append(L", "); + l->append(", "); LogParam(p.size, l); - l->append(L", "); + l->append(", "); LogParam(p.is_manifest, l); - l->append(L", "); + l->append(", "); LogParam(p.is_master, l); - l->append(L", "); + l->append(", "); LogParam(p.is_fallback, l); - l->append(L", "); + l->append(", "); LogParam(p.is_foreign, l); - l->append(L", "); + l->append(", "); LogParam(p.is_explicit, l); - l->append(L")"); + l->append(")"); } void ParamTraits<appcache::AppCacheInfo>::Write(Message* m, @@ -764,24 +764,24 @@ bool ParamTraits<appcache::AppCacheInfo>::Read(const Message* m, void** iter, } void ParamTraits<appcache::AppCacheInfo>::Log(const param_type& p, - std::wstring* l) { - l->append(L"("); + std::string* l) { + l->append("("); LogParam(p.manifest_url, l); - l->append(L", "); + l->append(", "); LogParam(p.creation_time, l); - l->append(L", "); + l->append(", "); LogParam(p.last_update_time, l); - l->append(L", "); + l->append(", "); LogParam(p.last_access_time, l); - l->append(L", "); + l->append(", "); LogParam(p.cache_id, l); - l->append(L", "); + l->append(", "); LogParam(p.status, l); - l->append(L", "); + l->append(", "); LogParam(p.size, l); - l->append(L")"); + l->append(")"); LogParam(p.is_complete, l); - l->append(L", "); + l->append(", "); } void ParamTraits<webkit_glue::WebAccessibility>::Write(Message* m, @@ -819,24 +819,24 @@ bool ParamTraits<webkit_glue::WebAccessibility>::Read( } void ParamTraits<webkit_glue::WebAccessibility>::Log(const param_type& p, - std::wstring* l) { - l->append(L"("); + std::string* l) { + l->append("("); LogParam(p.id, l); - l->append(L", "); + l->append(", "); LogParam(p.name, l); - l->append(L", "); + l->append(", "); LogParam(p.value, l); - l->append(L", "); + l->append(", "); LogParam(static_cast<int>(p.role), l); - l->append(L", "); + l->append(", "); LogParam(static_cast<int>(p.state), l); - l->append(L", "); + l->append(", "); LogParam(p.location, l); - l->append(L", "); + l->append(", "); LogParam(p.attributes, l); - l->append(L", "); + l->append(", "); LogParam(p.children, l); - l->append(L")"); + l->append(")"); } } // namespace IPC diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 9d082bc..1ffee93 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -882,26 +882,26 @@ struct ParamTraits<ResourceType::Type> { *p = ResourceType::FromInt(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring type; + static void Log(const param_type& p, std::string* l) { + std::string type; switch (p) { case ResourceType::MAIN_FRAME: - type = L"MAIN_FRAME"; + type = "MAIN_FRAME"; break; case ResourceType::SUB_FRAME: - type = L"SUB_FRAME"; + type = "SUB_FRAME"; break; case ResourceType::SUB_RESOURCE: - type = L"SUB_RESOURCE"; + type = "SUB_RESOURCE"; break; case ResourceType::OBJECT: - type = L"OBJECT"; + type = "OBJECT"; break; case ResourceType::MEDIA: - type = L"MEDIA"; + type = "MEDIA"; break; default: - type = L"UNKNOWN"; + type = "UNKNOWN"; break; } @@ -915,7 +915,7 @@ struct ParamTraits<ViewMsg_Navigate_Params> { typedef ViewMsg_Navigate_Params param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template<> @@ -931,27 +931,27 @@ struct ParamTraits<ViewMsg_Navigate_Params::NavigationType> { *p = static_cast<ViewMsg_Navigate_Params::NavigationType>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring event; + static void Log(const param_type& p, std::string* l) { + std::string event; switch (p) { case ViewMsg_Navigate_Params::RELOAD: - event = L"NavigationType_RELOAD"; + event = "NavigationType_RELOAD"; break; case ViewMsg_Navigate_Params::RELOAD_IGNORING_CACHE: - event = L"NavigationType_RELOAD_IGNORING_CACHE"; + event = "NavigationType_RELOAD_IGNORING_CACHE"; break; case ViewMsg_Navigate_Params::RESTORE: - event = L"NavigationType_RESTORE"; + event = "NavigationType_RESTORE"; break; case ViewMsg_Navigate_Params::NORMAL: - event = L"NavigationType_NORMAL"; + event = "NavigationType_NORMA"; break; default: - event = L"NavigationType_UNKNOWN"; + event = "NavigationType_UNKNOWN"; break; } LogParam(event, l); @@ -964,7 +964,7 @@ struct ParamTraits<webkit_glue::FormField> { typedef webkit_glue::FormField param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; // Traits for FontDescriptor structure to pack/unpack. @@ -980,8 +980,8 @@ struct ParamTraits<FontDescriptor> { ReadParam(m, iter, &p->font_name) && ReadParam(m, iter, &p->font_point_size)); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<FontDescriptor>"); + static void Log(const param_type& p, std::string* l) { + l->append("<FontDescriptor>"); } }; @@ -1000,28 +1000,28 @@ struct ParamTraits<ViewHostMsg_GetSearchProviderInstallState_Params> { p->state = static_cast<param_type::State>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring state; + static void Log(const param_type& p, std::string* l) { + std::string state; switch (p.state) { case ViewHostMsg_GetSearchProviderInstallState_Params::DENIED: - state = L"ViewHostMsg_GetSearchProviderInstallState_Params::DENIED"; + state = "ViewHostMsg_GetSearchProviderInstallState_Params::DENIED"; break; case ViewHostMsg_GetSearchProviderInstallState_Params::NOT_INSTALLED: state = - L"ViewHostMsg_GetSearchProviderInstallState_Params::NOT_INSTALLED"; + "ViewHostMsg_GetSearchProviderInstallState_Params::NOT_INSTALLED"; break; case ViewHostMsg_GetSearchProviderInstallState_Params:: INSTALLED_BUT_NOT_DEFAULT: - state = L"ViewHostMsg_GetSearchProviderInstallState_Params::" - L"INSTALLED_BUT_NOT_DEFAULT"; + state = "ViewHostMsg_GetSearchProviderInstallState_Params::" + "INSTALLED_BUT_NOT_DEFAULT"; break; case ViewHostMsg_GetSearchProviderInstallState_Params:: INSTALLED_AS_DEFAULT: - state = L"ViewHostMsg_GetSearchProviderInstallState_Params::" - L"INSTALLED_AS_DEFAULT"; + state = "ViewHostMsg_GetSearchProviderInstallState_Params::" + "INSTALLED_AS_DEFAULT"; break; default: - state = L"UNKNOWN"; + state = "UNKNOWN"; break; } LogParam(state, l); @@ -1067,38 +1067,38 @@ struct ParamTraits<ViewHostMsg_FrameNavigate_Params> { ReadParam(m, iter, &p->is_content_filtered) && ReadParam(m, iter, &p->http_status_code); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.page_id, l); - l->append(L", "); + l->append(", "); LogParam(p.url, l); - l->append(L", "); + l->append(", "); LogParam(p.referrer, l); - l->append(L", "); + l->append(", "); LogParam(p.transition, l); - l->append(L", "); + l->append(", "); LogParam(p.redirects, l); - l->append(L", "); + l->append(", "); LogParam(p.should_update_history, l); - l->append(L", "); + l->append(", "); LogParam(p.searchable_form_url, l); - l->append(L", "); + l->append(", "); LogParam(p.searchable_form_encoding, l); - l->append(L", "); + l->append(", "); LogParam(p.password_form, l); - l->append(L", "); + l->append(", "); LogParam(p.security_info, l); - l->append(L", "); + l->append(", "); LogParam(p.gesture, l); - l->append(L", "); + l->append(", "); LogParam(p.contents_mime_type, l); - l->append(L", "); + l->append(", "); LogParam(p.is_post, l); - l->append(L", "); + l->append(", "); LogParam(p.is_content_filtered, l); - l->append(L", "); + l->append(", "); LogParam(p.http_status_code, l); - l->append(L")"); + l->append(")"); } }; @@ -1107,7 +1107,7 @@ struct ParamTraits<ContextMenuParams> { typedef ContextMenuParams param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; // Traits for ViewHostMsg_UpdateRect_Params structure to pack/unpack. @@ -1116,7 +1116,7 @@ struct ParamTraits<ViewHostMsg_UpdateRect_Params> { typedef ViewHostMsg_UpdateRect_Params param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -1124,7 +1124,7 @@ struct ParamTraits<webkit_glue::WebPluginGeometry> { typedef webkit_glue::WebPluginGeometry param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; // Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack. @@ -1133,7 +1133,7 @@ struct ParamTraits<WebPluginMimeType> { typedef WebPluginMimeType param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -1141,7 +1141,7 @@ struct ParamTraits<WebPluginInfo> { typedef WebPluginInfo param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; // Traits for webkit_glue::PasswordFormDomManager::FillData. @@ -1150,7 +1150,7 @@ struct ParamTraits<webkit_glue::PasswordFormFillData> { typedef webkit_glue::PasswordFormFillData param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template<> @@ -1166,17 +1166,17 @@ struct ParamTraits<NavigationGesture> { *p = static_cast<NavigationGesture>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring event; + static void Log(const param_type& p, std::string* l) { + std::string event; switch (p) { case NavigationGestureUser: - event = L"GESTURE_USER"; + event = "GESTURE_USER"; break; case NavigationGestureAuto: - event = L"GESTURE_AUTO"; + event = "GESTURE_AUTO"; break; default: - event = L"GESTURE_UNKNOWN"; + event = "GESTURE_UNKNOWN"; break; } LogParam(event, l); @@ -1203,18 +1203,18 @@ struct ParamTraits<ViewMsg_ClosePage_Params> { ReadParam(m, iter, &r->new_request_id); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.closing_process_id, l); - l->append(L", "); + l->append(", "); LogParam(p.closing_route_id, l); - l->append(L", "); + l->append(", "); LogParam(p.for_cross_site_transition, l); - l->append(L", "); + l->append(", "); LogParam(p.new_render_process_host_id, l); - l->append(L", "); + l->append(", "); LogParam(p.new_request_id, l); - l->append(L")"); + l->append(")"); } }; @@ -1259,34 +1259,34 @@ struct ParamTraits<ViewHostMsg_Resource_Request> { ReadParam(m, iter, &r->host_renderer_id) && ReadParam(m, iter, &r->host_render_view_id); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.method, l); - l->append(L", "); + l->append(", "); LogParam(p.url, l); - l->append(L", "); + l->append(", "); LogParam(p.referrer, l); - l->append(L", "); + l->append(", "); LogParam(p.frame_origin, l); - l->append(L", "); + l->append(", "); LogParam(p.main_frame_origin, l); - l->append(L", "); + l->append(", "); LogParam(p.load_flags, l); - l->append(L", "); + l->append(", "); LogParam(p.origin_child_id, l); - l->append(L", "); + l->append(", "); LogParam(p.resource_type, l); - l->append(L", "); + l->append(", "); LogParam(p.request_context, l); - l->append(L", "); + l->append(", "); LogParam(p.appcache_host_id, l); - l->append(L", "); + l->append(", "); LogParam(p.download_to_file, l); - l->append(L", "); + l->append(", "); LogParam(p.host_renderer_id, l); - l->append(L", "); + l->append(", "); LogParam(p.host_render_view_id, l); - l->append(L")"); + l->append(")"); } }; @@ -1295,7 +1295,7 @@ struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { typedef scoped_refptr<net::HttpResponseHeaders> param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; // Traits for webkit_glue::ResourceLoaderBridge::LoadTimingInfo @@ -1342,34 +1342,34 @@ struct ParamTraits<webkit_glue::ResourceLoaderBridge::LoadTimingInfo> { ReadParam(m, iter, &r->receive_headers_start) && ReadParam(m, iter, &r->receive_headers_end); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.base_time, l); - l->append(L", "); + l->append(", "); LogParam(p.proxy_start, l); - l->append(L", "); + l->append(", "); LogParam(p.proxy_end, l); - l->append(L", "); + l->append(", "); LogParam(p.dns_start, l); - l->append(L", "); + l->append(", "); LogParam(p.dns_end, l); - l->append(L", "); + l->append(", "); LogParam(p.connect_start, l); - l->append(L", "); + l->append(", "); LogParam(p.connect_end, l); - l->append(L", "); + l->append(", "); LogParam(p.ssl_start, l); - l->append(L", "); + l->append(", "); LogParam(p.ssl_end, l); - l->append(L", "); + l->append(", "); LogParam(p.send_start, l); - l->append(L", "); + l->append(", "); LogParam(p.send_end, l); - l->append(L", "); + l->append(", "); LogParam(p.receive_headers_start, l); - l->append(L", "); + l->append(", "); LogParam(p.receive_headers_end, l); - l->append(L")"); + l->append(")"); } }; @@ -1416,42 +1416,42 @@ struct ParamTraits<webkit_glue::ResourceLoaderBridge::ResponseInfo> { ReadParam(m, iter, &r->was_alternate_protocol_available) && ReadParam(m, iter, &r->was_fetched_via_proxy); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.request_time, l); - l->append(L", "); + l->append(", "); LogParam(p.response_time, l); - l->append(L", "); + l->append(", "); LogParam(p.headers, l); - l->append(L", "); + l->append(", "); LogParam(p.mime_type, l); - l->append(L", "); + l->append(", "); LogParam(p.charset, l); - l->append(L", "); + l->append(", "); LogParam(p.security_info, l); - l->append(L", "); + l->append(", "); LogParam(p.content_length, l); - l->append(L", "); + l->append(", "); LogParam(p.appcache_id, l); - l->append(L", "); + l->append(", "); LogParam(p.appcache_manifest_url, l); - l->append(L", "); + l->append(", "); LogParam(p.connection_id, l); - l->append(L", "); + l->append(", "); LogParam(p.connection_reused, l); - l->append(L", "); + l->append(", "); LogParam(p.load_timing, l); - l->append(L", "); + l->append(", "); LogParam(p.download_file_path, l); - l->append(L", "); + l->append(", "); LogParam(p.was_fetched_via_spdy, l); - l->append(L", "); + l->append(", "); LogParam(p.was_npn_negotiated, l); - l->append(L", "); + l->append(", "); LogParam(p.was_alternate_protocol_available, l); - l->append(L", "); + l->append(", "); LogParam(p.was_fetched_via_proxy, l); - l->append(L")"); + l->append(")"); } }; @@ -1469,7 +1469,7 @@ struct ParamTraits<ResourceResponseHead> { ReadParam(m, iter, &r->status) && ReadParam(m, iter, &r->replace_extension_localization_templates); } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { // log more? ParamTraits<webkit_glue::ResourceLoaderBridge::ResponseInfo>::Log(p, l); } @@ -1489,21 +1489,19 @@ struct ParamTraits<SyncLoadResult> { ReadParam(m, iter, &r->final_url) && ReadParam(m, iter, &r->data); } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { // log more? ParamTraits<webkit_glue::ResourceLoaderBridge::ResponseInfo>::Log(p, l); } }; - - // Traits for FormData structure to pack/unpack. template <> struct ParamTraits<webkit_glue::FormData> { typedef webkit_glue::FormData param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; // Traits for ViewMsg_Print_Params @@ -1534,8 +1532,8 @@ struct ParamTraits<ViewMsg_Print_Params> { ReadParam(m, iter, &p->document_cookie) && ReadParam(m, iter, &p->selection_only); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<ViewMsg_Print_Params>"); + static void Log(const param_type& p, std::string* l) { + l->append("<ViewMsg_Print_Params>"); } }; @@ -1551,8 +1549,8 @@ struct ParamTraits<ViewMsg_PrintPage_Params> { return ReadParam(m, iter, &p->params) && ReadParam(m, iter, &p->page_number); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<ViewMsg_PrintPage_Params>"); + static void Log(const param_type& p, std::string* l) { + l->append("<ViewMsg_PrintPage_Params>"); } }; @@ -1568,8 +1566,8 @@ struct ParamTraits<ViewMsg_PrintPages_Params> { return ReadParam(m, iter, &p->params) && ReadParam(m, iter, &p->pages); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<ViewMsg_PrintPages_Params>"); + static void Log(const param_type& p, std::string* l) { + l->append("<ViewMsg_PrintPages_Params>"); } }; @@ -1597,8 +1595,8 @@ struct ParamTraits<ViewHostMsg_DidPrintPage_Params> { ReadParam(m, iter, &p->content_area) && ReadParam(m, iter, &p->has_visible_overlays); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<ViewHostMsg_DidPrintPage_Params>"); + static void Log(const param_type& p, std::string* l) { + l->append("<ViewHostMsg_DidPrintPage_Params>"); } }; @@ -1612,8 +1610,8 @@ struct ParamTraits<CSSColors::CSSColorName> { static bool Read(const Message* m, void** iter, param_type* p) { return ReadParam(m, iter, reinterpret_cast<int*>(p)); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<CSSColorName>"); + static void Log(const param_type& p, std::string* l) { + l->append("<CSSColorName>"); } }; @@ -1624,7 +1622,7 @@ struct ParamTraits<RendererPreferences> { typedef RendererPreferences param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; // Traits for WebPreferences structure to pack/unpack. @@ -1633,7 +1631,7 @@ struct ParamTraits<WebPreferences> { typedef WebPreferences param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; // Traits for WebDropData @@ -1642,7 +1640,7 @@ struct ParamTraits<WebDropData> { typedef WebDropData param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; // Traits for AudioManager::Format. @@ -1659,20 +1657,20 @@ struct ParamTraits<AudioManager::Format> { *p = static_cast<AudioManager::Format>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring format; + static void Log(const param_type& p, std::string* l) { + std::string format; switch (p) { case AudioManager::AUDIO_PCM_LINEAR: - format = L"AUDIO_PCM_LINEAR"; + format = "AUDIO_PCM_LINEAR"; break; case AudioManager::AUDIO_PCM_LOW_LATENCY: - format = L"AUDIO_PCM_LOW_LATENCY"; + format = "AUDIO_PCM_LOW_LATENCY"; break; case AudioManager::AUDIO_MOCK: - format = L"AUDIO_MOCK"; + format = "AUDIO_MOCK"; break; default: - format = L"AUDIO_LAST_FORMAT"; + format = "AUDIO_LAST_FORMAT"; break; } LogParam(format, l); @@ -1698,18 +1696,18 @@ struct ParamTraits<ViewHostMsg_Audio_CreateStream_Params> { ReadParam(m, iter, &p->bits_per_sample) && ReadParam(m, iter, &p->packet_size); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<ViewHostMsg_Audio_CreateStream_Params>("); + static void Log(const param_type& p, std::string* l) { + l->append("<ViewHostMsg_Audio_CreateStream_Params>("); LogParam(p.format, l); - l->append(L", "); + l->append(", "); LogParam(p.channels, l); - l->append(L", "); + l->append(", "); LogParam(p.sample_rate, l); - l->append(L", "); + l->append(", "); LogParam(p.bits_per_sample, l); - l->append(L", "); + l->append(", "); LogParam(p.packet_size, l); - l->append(L")"); + l->append(")"); } }; @@ -1732,8 +1730,8 @@ struct ParamTraits<gfx::NativeView> { return true; } - static void Log(const param_type& p, std::wstring* l) { - l->append(StringPrintf(L"<gfx::NativeView>")); + static void Log(const param_type& p, std::string* l) { + l->append(StringPrintf("<gfx::NativeView>")); } }; @@ -1752,20 +1750,20 @@ struct ParamTraits<ViewMsg_AudioStreamState_Params> { p->state = static_cast<ViewMsg_AudioStreamState_Params::State>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring state; + static void Log(const param_type& p, std::string* l) { + std::string state; switch (p.state) { case ViewMsg_AudioStreamState_Params::kPlaying: - state = L"ViewMsg_AudioStreamState_Params::kPlaying"; + state = "ViewMsg_AudioStreamState_Params::kPlaying"; break; case ViewMsg_AudioStreamState_Params::kPaused: - state = L"ViewMsg_AudioStreamState_Params::kPaused"; + state = "ViewMsg_AudioStreamState_Params::kPaused"; break; case ViewMsg_AudioStreamState_Params::kError: - state = L"ViewMsg_AudioStreamState_Params::kError"; + state = "ViewMsg_AudioStreamState_Params::kError"; break; default: - state = L"UNKNOWN"; + state = "UNKNOWN"; break; } LogParam(state, l); @@ -1785,20 +1783,20 @@ struct ParamTraits<ViewMsg_StopFinding_Params> { p->action = static_cast<ViewMsg_StopFinding_Params::Action>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring action; + static void Log(const param_type& p, std::string* l) { + std::string action; switch (p.action) { case ViewMsg_StopFinding_Params::kClearSelection: - action = L"ViewMsg_StopFinding_Params::kClearSelection"; + action = "ViewMsg_StopFinding_Params::kClearSelection"; break; case ViewMsg_StopFinding_Params::kKeepSelection: - action = L"ViewMsg_StopFinding_Params::kKeepSelection"; + action = "ViewMsg_StopFinding_Params::kKeepSelection"; break; case ViewMsg_StopFinding_Params::kActivateSelection: - action = L"ViewMsg_StopFinding_Params::kActivateSelection"; + action = "ViewMsg_StopFinding_Params::kActivateSelection"; break; default: - action = L"UNKNOWN"; + action = "UNKNOWN"; break; } LogParam(action, l); @@ -1818,29 +1816,29 @@ struct ParamTraits<appcache::Status> { *p = static_cast<param_type>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring state; + static void Log(const param_type& p, std::string* l) { + std::string state; switch (p) { case appcache::UNCACHED: - state = L"UNCACHED"; + state = "UNCACHED"; break; case appcache::IDLE: - state = L"IDLE"; + state = "IDLE"; break; case appcache::CHECKING: - state = L"CHECKING"; + state = "CHECKING"; break; case appcache::DOWNLOADING: - state = L"DOWNLOADING"; + state = "DOWNLOADING"; break; case appcache::UPDATE_READY: - state = L"UPDATE_READY"; + state = "UPDATE_READY"; break; case appcache::OBSOLETE: - state = L"OBSOLETE"; + state = "OBSOLETE"; break; default: - state = L"InvalidStatusValue"; + state = "InvalidStatusValue"; break; } @@ -1861,35 +1859,35 @@ struct ParamTraits<appcache::EventID> { *p = static_cast<param_type>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring state; + static void Log(const param_type& p, std::string* l) { + std::string state; switch (p) { case appcache::CHECKING_EVENT: - state = L"CHECKING_EVENT"; + state = "CHECKING_EVENT"; break; case appcache::ERROR_EVENT: - state = L"ERROR_EVENT"; + state = "ERROR_EVENT"; break; case appcache::NO_UPDATE_EVENT: - state = L"NO_UPDATE_EVENT"; + state = "NO_UPDATE_EVENT"; break; case appcache::DOWNLOADING_EVENT: - state = L"DOWNLOADING_EVENT"; + state = "DOWNLOADING_EVENT"; break; case appcache::PROGRESS_EVENT: - state = L"PROGRESS_EVENT"; + state = "PROGRESS_EVENT"; break; case appcache::UPDATE_READY_EVENT: - state = L"UPDATE_READY_EVENT"; + state = "UPDATE_READY_EVENT"; break; case appcache::CACHED_EVENT: - state = L"CACHED_EVENT"; + state = "CACHED_EVENT"; break; case appcache::OBSOLETE_EVENT: - state = L"OBSOLETE_EVENT"; + state = "OBSOLETE_EVENT"; break; default: - state = L"InvalidEventValue"; + state = "InvalidEventValue"; break; } @@ -1910,20 +1908,20 @@ struct ParamTraits<WebMenuItem::Type> { *p = static_cast<WebMenuItem::Type>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring type; + static void Log(const param_type& p, std::string* l) { + std::string type; switch (p) { case WebMenuItem::OPTION: - type = L"OPTION"; + type = "OPTION"; break; case WebMenuItem::GROUP: - type = L"GROUP"; + type = "GROUP"; break; case WebMenuItem::SEPARATOR: - type = L"SEPARATOR"; + type = "SEPARATOR"; break; default: - type = L"UNKNOWN"; + type = "UNKNOWN"; break; } LogParam(type, l); @@ -1948,18 +1946,18 @@ struct ParamTraits<WebMenuItem> { ReadParam(m, iter, &p->checked) && ReadParam(m, iter, &p->action); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.label, l); - l->append(L", "); + l->append(", "); LogParam(p.type, l); - l->append(L", "); + l->append(", "); LogParam(p.enabled, l); - l->append(L", "); + l->append(", "); LogParam(p.checked, l); - l->append(L", "); + l->append(", "); LogParam(p.action, l); - l->append(L")"); + l->append(")"); } }; @@ -1984,20 +1982,20 @@ struct ParamTraits<ViewHostMsg_ShowPopup_Params> { ReadParam(m, iter, &p->popup_items) && ReadParam(m, iter, &p->right_aligned); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.bounds, l); - l->append(L", "); + l->append(", "); LogParam(p.item_height, l); - l->append(L", "); + l->append(", "); LogParam(p.item_font_size, l); - l->append(L", "); + l->append(", "); LogParam(p.selected_item, l); - l->append(L", "); + l->append(", "); LogParam(p.popup_items, l); - l->append(L", "); + l->append(", "); LogParam(p.right_aligned, l); - l->append(L")"); + l->append(")"); } }; @@ -2022,20 +2020,20 @@ struct ParamTraits<ViewHostMsg_ScriptedPrint_Params> { ReadParam(m, iter, &p->has_selection) && ReadParam(m, iter, &p->use_overlays); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.routing_id, l); - l->append(L", "); + l->append(", "); LogParam(p.host_window_id, l); - l->append(L", "); + l->append(", "); LogParam(p.cookie, l); - l->append(L", "); + l->append(", "); LogParam(p.expected_pages_count, l); - l->append(L", "); + l->append(", "); LogParam(p.has_selection, l); - l->append(L","); + l->append(","); LogParam(p.use_overlays, l); - l->append(L")"); + l->append(")"); } }; @@ -2050,7 +2048,7 @@ struct ParamTraits<URLPattern> { typedef URLPattern param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -2066,22 +2064,22 @@ struct ParamTraits<Clipboard::Buffer> { *p = Clipboard::FromInt(buffer); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring type; + static void Log(const param_type& p, std::string* l) { + std::string type; switch (p) { case Clipboard::BUFFER_STANDARD: - type = L"BUFFER_STANDARD"; + type = "BUFFER_STANDARD"; break; #if defined(USE_X11) case Clipboard::BUFFER_SELECTION: - type = L"BUFFER_SELECTION"; + type = "BUFFER_SELECTION"; break; #endif case Clipboard::BUFFER_DRAG: - type = L"BUFFER_DRAG"; + type = "BUFFER_DRAG"; break; default: - type = L"UNKNOWN"; + type = "UNKNOWN"; break; } @@ -2095,7 +2093,7 @@ struct ParamTraits<EditCommand> { typedef EditCommand param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; // Traits for DOMStorageType enum. @@ -2112,18 +2110,18 @@ struct ParamTraits<DOMStorageType> { *p = static_cast<param_type>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring control; + static void Log(const param_type& p, std::string* l) { + std::string control; switch (p) { case DOM_STORAGE_LOCAL: - control = L"DOM_STORAGE_LOCAL"; + control = "DOM_STORAGE_LOCAL"; break; case DOM_STORAGE_SESSION: - control = L"DOM_STORAGE_SESSION"; + control = "DOM_STORAGE_SESSION"; break; default: NOTIMPLEMENTED(); - control = L"UNKNOWN"; + control = "UNKNOWN"; break; } LogParam(control, l); @@ -2144,21 +2142,21 @@ struct ParamTraits<WebKit::WebStorageArea::Result> { *p = static_cast<param_type>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring control; + static void Log(const param_type& p, std::string* l) { + std::string control; switch (p) { case WebKit::WebStorageArea::ResultOK: - control = L"WebKit::WebStorageArea::ResultOK"; + control = "WebKit::WebStorageArea::ResultOK"; break; case WebKit::WebStorageArea::ResultBlockedByQuota: - control = L"WebKit::WebStorageArea::ResultBlockedByQuota"; + control = "WebKit::WebStorageArea::ResultBlockedByQuota"; break; case WebKit::WebStorageArea::ResultBlockedByPolicy: - control = L"WebKit::WebStorageArea::ResultBlockedByPolicy"; + control = "WebKit::WebStorageArea::ResultBlockedByPolicy"; break; default: NOTIMPLEMENTED(); - control = L"UNKNOWN"; + control = "UNKNOWN"; break; } LogParam(control, l); @@ -2186,20 +2184,20 @@ struct ParamTraits<ViewMsg_DOMStorageEvent_Params> { ReadParam(m, iter, &p->url_) && ReadParam(m, iter, &p->storage_type_); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.key_, l); - l->append(L", "); + l->append(", "); LogParam(p.old_value_, l); - l->append(L", "); + l->append(", "); LogParam(p.new_value_, l); - l->append(L", "); + l->append(", "); LogParam(p.origin_, l); - l->append(L", "); + l->append(", "); LogParam(p.url_, l); - l->append(L", "); + l->append(", "); LogParam(p.storage_type_, l); - l->append(L")"); + l->append(")"); } }; @@ -2222,18 +2220,18 @@ struct ParamTraits<ViewHostMsg_IDBFactoryOpen_Params> { ReadParam(m, iter, &p->name_) && ReadParam(m, iter, &p->description_); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.routing_id_, l); - l->append(L", "); + l->append(", "); LogParam(p.response_id_, l); - l->append(L", "); + l->append(", "); LogParam(p.origin_, l); - l->append(L", "); + l->append(", "); LogParam(p.name_, l); - l->append(L", "); + l->append(", "); LogParam(p.description_, l); - l->append(L")"); + l->append(")"); } }; @@ -2256,18 +2254,18 @@ struct ParamTraits<ViewHostMsg_IDBDatabaseCreateObjectStore_Params> { ReadParam(m, iter, &p->auto_increment_) && ReadParam(m, iter, &p->idb_database_id_); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.response_id_, l); - l->append(L", "); + l->append(", "); LogParam(p.name_, l); - l->append(L", "); + l->append(", "); LogParam(p.key_path_, l); - l->append(L", "); + l->append(", "); LogParam(p.auto_increment_, l); - l->append(L", "); + l->append(", "); LogParam(p.idb_database_id_, l); - l->append(L")"); + l->append(")"); } }; @@ -2290,18 +2288,18 @@ struct ParamTraits<ViewHostMsg_IDBObjectStoreCreateIndex_Params> { ReadParam(m, iter, &p->unique_) && ReadParam(m, iter, &p->idb_object_store_id_); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.response_id_, l); - l->append(L", "); + l->append(", "); LogParam(p.name_, l); - l->append(L", "); + l->append(", "); LogParam(p.key_path_, l); - l->append(L", "); + l->append(", "); LogParam(p.unique_, l); - l->append(L", "); + l->append(", "); LogParam(p.idb_object_store_id_, l); - l->append(L")"); + l->append(")"); } }; @@ -2326,20 +2324,20 @@ struct ParamTraits<ViewHostMsg_IDBObjectStoreOpenCursor_Params> { ReadParam(m, iter, &p->direction_) && ReadParam(m, iter, &p->idb_object_store_id_); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.response_id_, l); - l->append(L", "); + l->append(", "); LogParam(p.left_key_, l); - l->append(L", "); + l->append(", "); LogParam(p.right_key_, l); - l->append(L", "); + l->append(", "); LogParam(p.flags_, l); - l->append(L", "); + l->append(", "); LogParam(p.direction_, l); - l->append(L", "); + l->append(", "); LogParam(p.idb_object_store_id_, l); - l->append(L")"); + l->append(")"); } }; @@ -2368,24 +2366,24 @@ struct ParamTraits<ViewHostMsg_CreateWorker_Params> { ReadParam(m, iter, &p->parent_appcache_host_id) && ReadParam(m, iter, &p->script_resource_appcache_id); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.url, l); - l->append(L", "); + l->append(", "); LogParam(p.is_shared, l); - l->append(L", "); + l->append(", "); LogParam(p.name, l); - l->append(L", "); + l->append(", "); LogParam(p.document_id, l); - l->append(L", "); + l->append(", "); LogParam(p.render_view_route_id, l); - l->append(L","); + l->append(","); LogParam(p.route_id, l); - l->append(L", "); + l->append(", "); LogParam(p.parent_appcache_host_id, l); - l->append(L","); + l->append(","); LogParam(p.script_resource_appcache_id, l); - l->append(L")"); + l->append(")"); } }; @@ -2416,26 +2414,26 @@ struct ParamTraits<ViewHostMsg_ShowNotification_Params> { ReadParam(m, iter, &p->replace_id) && ReadParam(m, iter, &p->notification_id); } - static void Log(const param_type &p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type &p, std::string* l) { + l->append("("); LogParam(p.origin, l); - l->append(L", "); + l->append(", "); LogParam(p.is_html, l); - l->append(L", "); + l->append(", "); LogParam(p.contents_url, l); - l->append(L", "); + l->append(", "); LogParam(p.icon_url, l); - l->append(L", "); + l->append(", "); LogParam(p.title, l); - l->append(L","); + l->append(","); LogParam(p.body, l); - l->append(L","); + l->append(","); LogParam(p.direction, l); - l->append(L","); + l->append(","); LogParam(p.replace_id, l); - l->append(L","); + l->append(","); LogParam(p.notification_id, l); - l->append(L")"); + l->append(")"); } }; @@ -2445,7 +2443,7 @@ struct ParamTraits<webkit_glue::WebCookie> { typedef webkit_glue::WebCookie param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template<> @@ -2468,8 +2466,8 @@ struct ParamTraits<ViewMsg_ExecuteCode_Params> { ReadParam(m, iter, &p->code) && ReadParam(m, iter, &p->all_frames); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<ViewMsg_ExecuteCode_Params>"); + static void Log(const param_type& p, std::string* l) { + l->append("<ViewMsg_ExecuteCode_Params>"); } }; @@ -2494,20 +2492,20 @@ struct ParamTraits<ViewMsg_New_Params> { ReadParam(m, iter, &p->session_storage_namespace_id) && ReadParam(m, iter, &p->frame_name); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.parent_window, l); - l->append(L", "); + l->append(", "); LogParam(p.renderer_preferences, l); - l->append(L", "); + l->append(", "); LogParam(p.web_preferences, l); - l->append(L", "); + l->append(", "); LogParam(p.view_id, l); - l->append(L", "); + l->append(", "); LogParam(p.session_storage_namespace_id, l); - l->append(L", "); + l->append(", "); LogParam(p.frame_name, l); - l->append(L")"); + l->append(")"); } }; @@ -2537,22 +2535,22 @@ struct ParamTraits<ViewHostMsg_RunFileChooser_Params> { ReadParam(m, iter, &p->title) && ReadParam(m, iter, &p->default_file_name); }; - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { switch (p.mode) { case param_type::Open: - l->append(L"(Open, "); + l->append("(Open, "); break; case param_type::OpenMultiple: - l->append(L"(OpenMultiple, "); + l->append("(OpenMultiple, "); break; case param_type::Save: - l->append(L"(Save, "); + l->append("(Save, "); break; default: - l->append(L"(UNKNOWN, "); + l->append("(UNKNOWN, "); } LogParam(p.title, l); - l->append(L", "); + l->append(", "); LogParam(p.default_file_name, l); } }; @@ -2575,18 +2573,18 @@ struct ParamTraits<ViewHostMsg_CreateWindow_Params> { ReadParam(m, iter, &p->session_storage_namespace_id) && ReadParam(m, iter, &p->frame_name); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.opener_id, l); - l->append(L", "); + l->append(", "); LogParam(p.user_gesture, l); - l->append(L", "); + l->append(", "); LogParam(p.window_container_type, l); - l->append(L", "); + l->append(", "); LogParam(p.session_storage_namespace_id, l); - l->append(L", "); + l->append(", "); LogParam(p.frame_name, l); - l->append(L")"); + l->append(")"); } }; @@ -2595,7 +2593,7 @@ struct ParamTraits<ExtensionExtent> { typedef ExtensionExtent param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -2611,7 +2609,7 @@ struct ParamTraits<ViewMsg_ExtensionExtentInfo> { ReadParam(m, iter, &p->web_extent) && ReadParam(m, iter, &p->browse_extent); } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { LogParam(p.extension_id, l); } }; @@ -2625,7 +2623,7 @@ struct ParamTraits<ViewMsg_ExtensionExtentsUpdated_Params> { static bool Read(const Message* m, void** iter, param_type* p) { return ReadParam(m, iter, &p->extension_apps); } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { LogParam(p.extension_apps, l); } }; @@ -2635,7 +2633,7 @@ struct ParamTraits<appcache::AppCacheResourceInfo> { typedef appcache::AppCacheResourceInfo param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -2643,7 +2641,7 @@ struct ParamTraits<appcache::AppCacheInfo> { typedef appcache::AppCacheInfo param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -2662,7 +2660,7 @@ struct ParamTraits<WindowContainerType> { *p = static_cast<param_type>(val); return true; } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { ParamTraits<int>::Log(static_cast<int>(p), l); } }; @@ -2672,7 +2670,7 @@ struct ParamTraits<webkit_glue::WebAccessibility> { typedef webkit_glue::WebAccessibility param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; // Traits for ViewMsg_DeviceOrientationUpdated_Params @@ -2697,20 +2695,20 @@ struct ParamTraits<ViewMsg_DeviceOrientationUpdated_Params> { ReadParam(m, iter, &p->can_provide_gamma) && ReadParam(m, iter, &p->gamma); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.can_provide_alpha, l); - l->append(L", "); + l->append(", "); LogParam(p.alpha, l); - l->append(L", "); + l->append(", "); LogParam(p.can_provide_beta, l); - l->append(L", "); + l->append(", "); LogParam(p.beta, l); - l->append(L", "); + l->append(", "); LogParam(p.can_provide_gamma, l); - l->append(L", "); + l->append(", "); LogParam(p.gamma, l); - l->append(L")"); + l->append(")"); } }; } // namespace IPC diff --git a/chrome/common/utility_messages.h b/chrome/common/utility_messages.h index 516081c..3094963 100644 --- a/chrome/common/utility_messages.h +++ b/chrome/common/utility_messages.h @@ -36,18 +36,18 @@ struct ParamTraits<UpdateManifest::Result> { ReadParam(m, iter, &p->package_hash) && ReadParam(m, iter, &p->crx_url); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.extension_id, l); - l->append(L", "); + l->append(", "); LogParam(p.version, l); - l->append(L", "); + l->append(", "); LogParam(p.browser_min_version, l); - l->append(L", "); + l->append(", "); LogParam(p.package_hash, l); - l->append(L", "); + l->append(", "); LogParam(p.crx_url, l); - l->append(L")"); + l->append(")"); } }; @@ -62,12 +62,12 @@ struct ParamTraits<UpdateManifest::Results> { return ReadParam(m, iter, &p->list) && ReadParam(m, iter, &p->daystart_elapsed_seconds); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.list, l); - l->append(L", "); + l->append(", "); LogParam(p.daystart_elapsed_seconds, l); - l->append(L")"); + l->append(")"); } }; diff --git a/chrome/common/webkit_param_traits.cc b/chrome/common/webkit_param_traits.cc index 4a81d46..26465dd 100644 --- a/chrome/common/webkit_param_traits.cc +++ b/chrome/common/webkit_param_traits.cc @@ -4,6 +4,7 @@ #include "chrome/common/webkit_param_traits.h" +#include "base/format_macros.h" #include "third_party/WebKit/WebKit/chromium/public/WebCompositionUnderline.h" #include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h" #include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerAction.h" @@ -27,16 +28,16 @@ bool ParamTraits<WebKit::WebRect>::Read(const Message* m, void** iter, ReadParam(m, iter, &p->height); } -void ParamTraits<WebKit::WebRect>::Log(const param_type& p, std::wstring* l) { - l->append(L"("); +void ParamTraits<WebKit::WebRect>::Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.x, l); - l->append(L", "); + l->append(", "); LogParam(p.y, l); - l->append(L", "); + l->append(", "); LogParam(p.width, l); - l->append(L", "); + l->append(", "); LogParam(p.height, l); - l->append(L")"); + l->append(")"); } void ParamTraits<WebKit::WebScreenInfo>::Write(Message* m, const param_type& p) { @@ -58,18 +59,18 @@ bool ParamTraits<WebKit::WebScreenInfo>::Read(const Message* m, void** iter, } void ParamTraits<WebKit::WebScreenInfo>::Log(const param_type& p, - std::wstring* l) { - l->append(L"("); + std::string* l) { + l->append("("); LogParam(p.depth, l); - l->append(L", "); + l->append(", "); LogParam(p.depthPerComponent, l); - l->append(L", "); + l->append(", "); LogParam(p.isMonochrome, l); - l->append(L", "); + l->append(", "); LogParam(p.rect, l); - l->append(L", "); + l->append(", "); LogParam(p.availableRect, l); - l->append(L")"); + l->append(")"); } void ParamTraits<WebKit::WebFindOptions>::Write(Message* m, @@ -88,14 +89,20 @@ bool ParamTraits<WebKit::WebFindOptions>::Read(const Message* m, void** iter, } void ParamTraits<WebKit::WebFindOptions>::Log(const param_type& p, - std::wstring* l) { - l->append(L"("); + std::string* l) { + l->append("("); LogParam(p.forward, l); - l->append(L", "); + l->append(", "); LogParam(p.matchCase, l); - l->append(L", "); + l->append(", "); LogParam(p.findNext, l); - l->append(L")"); + l->append(")"); +} + +void ParamTraits<WebKit::WebCache::ResourceTypeStat>::Log( + const param_type& p, std::string* l) { + l->append(StringPrintf("%" PRIuS " %" PRIuS " %" PRIuS " %" PRIuS, + p.count, p.size, p.liveSize, p.decodedSize)); } void ParamTraits<WebKit::WebMediaPlayerAction>::Write(Message* m, @@ -115,25 +122,25 @@ bool ParamTraits<WebKit::WebMediaPlayerAction>::Read(const Message* m, } void ParamTraits<WebKit::WebMediaPlayerAction>::Log(const param_type& p, - std::wstring* l) { - l->append(L"("); + std::string* l) { + l->append("("); switch (p.type) { case WebKit::WebMediaPlayerAction::Play: - l->append(L"Play"); + l->append("Play"); break; case WebKit::WebMediaPlayerAction::Mute: - l->append(L"Mute"); + l->append("Mute"); break; case WebKit::WebMediaPlayerAction::Loop: - l->append(L"Loop"); + l->append("Loop"); break; default: - l->append(L"Unknown"); + l->append("Unknown"); break; } - l->append(L", "); + l->append(", "); LogParam(p.enable, l); - l->append(L")"); + l->append(")"); } void ParamTraits<WebKit::WebCompositionUnderline>::Write(Message* m, @@ -155,16 +162,16 @@ bool ParamTraits<WebKit::WebCompositionUnderline>::Read( } void ParamTraits<WebKit::WebCompositionUnderline>::Log(const param_type& p, - std::wstring* l) { - l->append(L"("); + std::string* l) { + l->append("("); LogParam(p.startOffset, l); - l->append(L","); + l->append(","); LogParam(p.endOffset, l); - l->append(L":"); + l->append(":"); LogParam(p.color, l); - l->append(L":"); + l->append(":"); LogParam(p.thick, l); - l->append(L")"); + l->append(")"); } } // namespace IPC diff --git a/chrome/common/webkit_param_traits.h b/chrome/common/webkit_param_traits.h index 63cb10b..5310a4d 100644 --- a/chrome/common/webkit_param_traits.h +++ b/chrome/common/webkit_param_traits.h @@ -49,7 +49,7 @@ struct ParamTraits<WebKit::WebRect> { typedef WebKit::WebRect param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -57,7 +57,7 @@ struct ParamTraits<WebKit::WebScreenInfo> { typedef WebKit::WebScreenInfo param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -73,7 +73,7 @@ struct ParamTraits<WebKit::WebConsoleMessage::Level> { *r = static_cast<param_type>(value); return true; } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { LogParam(static_cast<int>(p), l); } }; @@ -91,7 +91,7 @@ struct ParamTraits<WebKit::WebPopupType> { *r = static_cast<param_type>(value); return true; } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { LogParam(static_cast<int>(p), l); } }; @@ -101,7 +101,7 @@ struct ParamTraits<WebKit::WebFindOptions> { typedef WebKit::WebFindOptions param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -117,41 +117,41 @@ struct ParamTraits<WebKit::WebInputEvent::Type> { *p = static_cast<WebKit::WebInputEvent::Type>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - const wchar_t* type; + static void Log(const param_type& p, std::string* l) { + const char* type; switch (p) { case WebKit::WebInputEvent::MouseDown: - type = L"MouseDown"; + type = "MouseDown"; break; case WebKit::WebInputEvent::MouseUp: - type = L"MouseUp"; + type = "MouseUp"; break; case WebKit::WebInputEvent::MouseMove: - type = L"MouseMove"; + type = "MouseMove"; break; case WebKit::WebInputEvent::MouseLeave: - type = L"MouseLeave"; + type = "MouseLeave"; break; case WebKit::WebInputEvent::MouseEnter: - type = L"MouseEnter"; + type = "MouseEnter"; break; case WebKit::WebInputEvent::MouseWheel: - type = L"MouseWheel"; + type = "MouseWheel"; break; case WebKit::WebInputEvent::RawKeyDown: - type = L"RawKeyDown"; + type = "RawKeyDown"; break; case WebKit::WebInputEvent::KeyDown: - type = L"KeyDown"; + type = "KeyDown"; break; case WebKit::WebInputEvent::KeyUp: - type = L"KeyUp"; + type = "KeyUp"; break; default: - type = L"None"; + type = "None"; break; } - LogParam(std::wstring(type), l); + LogParam(std::string(type), l); } }; @@ -173,8 +173,8 @@ struct ParamTraits<WebKit::WebCache::UsageStats> { ReadParam(m, iter, &r->liveSize) && ReadParam(m, iter, &r->deadSize); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<WebCache::UsageStats>"); + static void Log(const param_type& p, std::string* l) { + l->append("<WebCache::UsageStats>"); } }; @@ -195,10 +195,7 @@ struct ParamTraits<WebKit::WebCache::ResourceTypeStat> { ReadParam(m, iter, &r->decodedSize); return result; } - static void Log(const param_type& p, std::wstring* l) { - l->append(StringPrintf(L"%d %d %d %d", p.count, p.size, p.liveSize, - p.decodedSize)); - } + static void Log(const param_type& p, std::string* l); }; template <> @@ -220,14 +217,14 @@ struct ParamTraits<WebKit::WebCache::ResourceTypeStats> { ReadParam(m, iter, &r->fonts); return result; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<WebCoreStats>"); + static void Log(const param_type& p, std::string* l) { + l->append("<WebCoreStats>"); LogParam(p.images, l); LogParam(p.cssStyleSheets, l); LogParam(p.scripts, l); LogParam(p.xslStyleSheets, l); LogParam(p.fonts, l); - l->append(L"</WebCoreStats>"); + l->append("</WebCoreStats>"); } }; @@ -244,7 +241,7 @@ struct ParamTraits<WebKit::WebTextDirection> { *r = static_cast<param_type>(value); return true; } - static void Log(const param_type& p, std::wstring* l) { + static void Log(const param_type& p, std::string* l) { LogParam(static_cast<int>(p), l); } }; @@ -261,8 +258,8 @@ struct ParamTraits<WebKit::WebDragOperation> { *r = static_cast<param_type>(temp); return res; } - static void Log(const param_type& p, std::wstring* l) { - l->append(StringPrintf(L"%d", p)); + static void Log(const param_type& p, std::string* l) { + l->append(StringPrintf("%d", p)); } }; @@ -271,7 +268,7 @@ struct ParamTraits<WebKit::WebMediaPlayerAction> { typedef WebKit::WebMediaPlayerAction param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -293,7 +290,7 @@ struct ParamTraits<WebKit::WebCompositionUnderline> { typedef WebKit::WebCompositionUnderline param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::wstring* l); + static void Log(const param_type& p, std::string* l); }; template <> @@ -309,21 +306,21 @@ struct ParamTraits<WebKit::WebTextInputType> { *p = static_cast<param_type>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring control; + static void Log(const param_type& p, std::string* l) { + std::string control; switch (p) { case WebKit::WebTextInputTypeNone: - control = L"WebKit::WebTextInputTypeNone"; + control = "WebKit::WebTextInputTypeNone"; break; case WebKit::WebTextInputTypeText: - control = L"WebKit::WebTextInputTypeText"; + control = "WebKit::WebTextInputTypeText"; break; case WebKit::WebTextInputTypePassword: - control = L"WebKit::WebTextInputTypePassword"; + control = "WebKit::WebTextInputTypePassword"; break; default: NOTIMPLEMENTED(); - control = L"UNKNOWN"; + control = "UNKNOWN"; break; } LogParam(control, l); diff --git a/chrome/common/worker_messages.h b/chrome/common/worker_messages.h index ba2e24d..80f876f 100644 --- a/chrome/common/worker_messages.h +++ b/chrome/common/worker_messages.h @@ -67,20 +67,20 @@ struct ParamTraits<WorkerHostMsg_PostConsoleMessageToWorkerObject_Params> { ReadParam(m, iter, &p->line_number) && ReadParam(m, iter, &p->source_url); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.source_identifier, l); - l->append(L", "); + l->append(", "); LogParam(p.message_type, l); - l->append(L", "); + l->append(", "); LogParam(p.message_level, l); - l->append(L", "); + l->append(", "); LogParam(p.message, l); - l->append(L", "); + l->append(", "); LogParam(p.line_number, l); - l->append(L", "); + l->append(", "); LogParam(p.source_url, l); - l->append(L")"); + l->append(")"); } }; @@ -107,22 +107,22 @@ struct ParamTraits<WorkerProcessMsg_CreateWorker_Params> { ReadParam(m, iter, &p->creator_appcache_host_id) && ReadParam(m, iter, &p->shared_worker_appcache_id); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.url, l); - l->append(L", "); + l->append(", "); LogParam(p.is_shared, l); - l->append(L", "); + l->append(", "); LogParam(p.name, l); - l->append(L", "); + l->append(", "); LogParam(p.route_id, l); - l->append(L", "); + l->append(", "); LogParam(p.creator_process_id, l); - l->append(L", "); + l->append(", "); LogParam(p.creator_appcache_host_id, l); - l->append(L", "); + l->append(", "); LogParam(p.shared_worker_appcache_id, l); - l->append(L")"); + l->append(")"); } }; diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc index 6e07318..82c2753 100644 --- a/chrome/renderer/print_web_view_helper.cc +++ b/chrome/renderer/print_web_view_helper.cc @@ -6,6 +6,7 @@ #include "app/l10n_util.h" #include "base/logging.h" +#include "base/utf_string_conversions.h" #include "chrome/common/render_messages.h" #include "chrome/renderer/render_view.h" #include "gfx/codec/jpeg_codec.h" diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc index 4b81c16..2e20197 100644 --- a/chrome/renderer/renderer_glue.cc +++ b/chrome/renderer/renderer_glue.cc @@ -18,6 +18,7 @@ #include "base/file_version_info.h" #include "base/ref_counted.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_version_info.h" #include "chrome/common/render_messages.h" diff --git a/chrome/renderer/renderer_webcookiejar_impl.cc b/chrome/renderer/renderer_webcookiejar_impl.cc index a8466ae..bd18aae 100644 --- a/chrome/renderer/renderer_webcookiejar_impl.cc +++ b/chrome/renderer/renderer_webcookiejar_impl.cc @@ -4,6 +4,7 @@ #include "chrome/renderer/renderer_webcookiejar_impl.h" +#include "base/utf_string_conversions.h" #include "chrome/common/render_messages.h" #include "chrome/renderer/render_thread.h" #include "third_party/WebKit/WebKit/chromium/public/WebCookie.h" diff --git a/chrome/renderer/spellchecker/spellcheck.cc b/chrome/renderer/spellchecker/spellcheck.cc index 75f6cfd..ab4809e 100644 --- a/chrome/renderer/spellchecker/spellcheck.cc +++ b/chrome/renderer/spellchecker/spellcheck.cc @@ -7,6 +7,7 @@ #include "base/file_util.h" #include "base/histogram.h" #include "base/time.h" +#include "base/utf_string_conversions.h" #include "chrome/common/render_messages.h" #include "chrome/common/spellcheck_common.h" #include "chrome/renderer/render_thread.h" diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc index a5053e4..de71d36 100644 --- a/chrome/renderer/webplugin_delegate_pepper.cc +++ b/chrome/renderer/webplugin_delegate_pepper.cc @@ -32,6 +32,7 @@ #include "base/string_util.h" #include "base/task.h" #include "base/time.h" +#include "base/utf_string_conversions.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/render_messages.h" #include "chrome/renderer/pepper_widget.h" diff --git a/chrome/test/automation/autocomplete_edit_proxy.h b/chrome/test/automation/autocomplete_edit_proxy.h index 7f5aa90..04f63d9 100644 --- a/chrome/test/automation/autocomplete_edit_proxy.h +++ b/chrome/test/automation/autocomplete_edit_proxy.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/string_number_conversions.h" #include "chrome/browser/autocomplete/autocomplete.h" #include "chrome/test/automation/automation_handle_tracker.h" #include "googleurl/src/gurl.h" @@ -87,30 +88,30 @@ struct ParamTraits<AutocompleteMatchData> { return true; } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"["); - l->append(UTF8ToWide(p.provider_name)); - l->append(L" "); - l->append(UTF8ToWide(base::IntToString(p.relevance))); - l->append(L" "); - l->append(p.deletable ? L"true" : L"false"); - l->append(L" "); - l->append(p.fill_into_edit); - l->append(L" "); - l->append(UTF8ToWide(base::IntToString(p.inline_autocomplete_offset))); - l->append(L" "); - l->append(UTF8ToWide(p.destination_url.spec())); - l->append(L" "); - l->append(p.contents); - l->append(L" "); - l->append(p.description); - l->append(L" "); - l->append(p.is_history_what_you_typed_match ? L"true" : L"false"); - l->append(L" "); - l->append(UTF8ToWide(p.type)); - l->append(L" "); - l->append(p.starred ? L"true" : L"false"); - l->append(L"]"); + static void Log(const param_type& p, std::string* l) { + l->append("["); + l->append(p.provider_name); + l->append(" "); + l->append(base::IntToString(p.relevance)); + l->append(" "); + l->append(p.deletable ? "true" : "false"); + l->append(" "); + LogParam(p.fill_into_edit, l); + l->append(" "); + l->append(base::IntToString(p.inline_autocomplete_offset)); + l->append(" "); + l->append(p.destination_url.spec()); + l->append(" "); + LogParam(p.contents, l); + l->append(" "); + LogParam(p.description, l); + l->append(" "); + l->append(p.is_history_what_you_typed_match ? "true" : "false"); + l->append(" "); + l->append(p.type); + l->append(" "); + l->append(p.starred ? "true" : "false"); + l->append("]"); } }; } // namespace IPC diff --git a/chrome/test/automation/automation_messages.h b/chrome/test/automation/automation_messages.h index cb4aa88..f4f7032 100644 --- a/chrome/test/automation/automation_messages.h +++ b/chrome/test/automation/automation_messages.h @@ -54,8 +54,8 @@ struct ParamTraits<AutomationMsg_Find_Params> { ReadParam(m, iter, &p->match_case) && ReadParam(m, iter, &p->find_next); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<AutomationMsg_Find_Params>"); + static void Log(const param_type& p, std::string* l) { + l->append("<AutomationMsg_Find_Params>"); } }; @@ -72,20 +72,20 @@ struct ParamTraits<AutomationMsg_NavigationResponseValues> { *p = static_cast<AutomationMsg_NavigationResponseValues>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring control; + static void Log(const param_type& p, std::string* l) { + std::string control; switch (p) { case AUTOMATION_MSG_NAVIGATION_ERROR: - control = L"AUTOMATION_MSG_NAVIGATION_ERROR"; + control = "AUTOMATION_MSG_NAVIGATION_ERROR"; break; case AUTOMATION_MSG_NAVIGATION_SUCCESS: - control = L"AUTOMATION_MSG_NAVIGATION_SUCCESS"; + control = "AUTOMATION_MSG_NAVIGATION_SUCCESS"; break; case AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED: - control = L"AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED"; + control = "AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED"; break; default: - control = L"UNKNOWN"; + control = "UNKNOWN"; break; } @@ -106,17 +106,17 @@ struct ParamTraits<AutomationMsg_ExtensionResponseValues> { *p = static_cast<AutomationMsg_ExtensionResponseValues>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring control; + static void Log(const param_type& p, std::string* l) { + std::string control; switch (p) { case AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED: - control = L"AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED"; + control = "AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED"; break; case AUTOMATION_MSG_EXTENSION_INSTALL_FAILED: - control = L"AUTOMATION_MSG_EXTENSION_INSTALL_FAILED"; + control = "AUTOMATION_MSG_EXTENSION_INSTALL_FAILED"; break; default: - control = L"UNKNOWN"; + control = "UNKNOWN"; break; } @@ -137,23 +137,23 @@ struct ParamTraits<AutomationMsg_ExtensionProperty> { *p = static_cast<AutomationMsg_ExtensionProperty>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring control; + static void Log(const param_type& p, std::string* l) { + std::string control; switch (p) { case AUTOMATION_MSG_EXTENSION_ID: - control = L"AUTOMATION_MSG_EXTENSION_ID"; + control = "AUTOMATION_MSG_EXTENSION_ID"; break; case AUTOMATION_MSG_EXTENSION_NAME: - control = L"AUTOMATION_MSG_EXTENSION_NAME"; + control = "AUTOMATION_MSG_EXTENSION_NAME"; break; case AUTOMATION_MSG_EXTENSION_VERSION: - control = L"AUTOMATION_MSG_EXTENSION_VERSION"; + control = "AUTOMATION_MSG_EXTENSION_VERSION"; break; case AUTOMATION_MSG_EXTENSION_BROWSER_ACTION_INDEX: - control = L"AUTOMATION_MSG_EXTENSION_BROWSER_ACTION_INDEX"; + control = "AUTOMATION_MSG_EXTENSION_BROWSER_ACTION_INDEX"; break; default: - control = L"UNKNOWN"; + control = "UNKNOWN"; break; } @@ -174,23 +174,23 @@ struct ParamTraits<SecurityStyle> { *p = static_cast<SecurityStyle>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring control; + static void Log(const param_type& p, std::string* l) { + std::string control; switch (p) { case SECURITY_STYLE_UNKNOWN: - control = L"SECURITY_STYLE_UNKNOWN"; + control = "SECURITY_STYLE_UNKNOWN"; break; case SECURITY_STYLE_UNAUTHENTICATED: - control = L"SECURITY_STYLE_UNAUTHENTICATED"; + control = "SECURITY_STYLE_UNAUTHENTICATED"; break; case SECURITY_STYLE_AUTHENTICATION_BROKEN: - control = L"SECURITY_STYLE_AUTHENTICATION_BROKEN"; + control = "SECURITY_STYLE_AUTHENTICATION_BROKEN"; break; case SECURITY_STYLE_AUTHENTICATED: - control = L"SECURITY_STYLE_AUTHENTICATED"; + control = "SECURITY_STYLE_AUTHENTICATED"; break; default: - control = L"UNKNOWN"; + control = "UNKNOWN"; break; } @@ -211,20 +211,20 @@ struct ParamTraits<NavigationEntry::PageType> { *p = static_cast<NavigationEntry::PageType>(type); return true; } - static void Log(const param_type& p, std::wstring* l) { - std::wstring control; + static void Log(const param_type& p, std::string* l) { + std::string control; switch (p) { case NavigationEntry::NORMAL_PAGE: - control = L"NORMAL_PAGE"; + control = "NORMAL_PAGE"; break; case NavigationEntry::ERROR_PAGE: - control = L"ERROR_PAGE"; + control = "ERROR_PAGE"; break; case NavigationEntry::INTERSTITIAL_PAGE: - control = L"INTERSTITIAL_PAGE"; + control = "INTERSTITIAL_PAGE"; break; default: - control = L"UNKNOWN"; + control = "UNKNOWN"; break; } @@ -271,26 +271,26 @@ struct ParamTraits<Reposition_Params> { ReadParam(m, iter, &p->set_parent) && ReadParam(m, iter, &p->parent_window); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.window, l); - l->append(L", "); + l->append(", "); LogParam(p.window_insert_after, l); - l->append(L", "); + l->append(", "); LogParam(p.left, l); - l->append(L", "); + l->append(", "); LogParam(p.top, l); - l->append(L", "); + l->append(", "); LogParam(p.width, l); - l->append(L", "); + l->append(", "); LogParam(p.height, l); - l->append(L", "); + l->append(", "); LogParam(p.flags, l); - l->append(L", "); + l->append(", "); LogParam(p.set_parent, l); - l->append(L", "); + l->append(", "); LogParam(p.parent_window, l); - l->append(L")"); + l->append(")"); } }; #endif // defined(OS_WIN) @@ -321,18 +321,18 @@ struct ParamTraits<AutomationURLRequest> { ReadParam(m, iter, &p->extra_request_headers) && ReadParam(m, iter, &p->upload_data); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.url, l); - l->append(L", "); + l->append(", "); LogParam(p.method, l); - l->append(L", "); + l->append(", "); LogParam(p.referrer, l); - l->append(L", "); + l->append(", "); LogParam(p.extra_request_headers, l); - l->append(L", "); + l->append(", "); LogParam(p.upload_data, l); - l->append(L")"); + l->append(")"); } }; @@ -365,20 +365,20 @@ struct ParamTraits<AutomationURLResponse> { ReadParam(m, iter, &p->redirect_url) && ReadParam(m, iter, &p->redirect_status); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.mime_type, l); - l->append(L", "); + l->append(", "); LogParam(p.headers, l); - l->append(L", "); + l->append(", "); LogParam(p.content_length, l); - l->append(L", "); + l->append(", "); LogParam(p.last_modified, l); - l->append(L", "); + l->append(", "); LogParam(p.redirect_url, l); - l->append(L", "); + l->append(", "); LogParam(p.redirect_status, l); - l->append(L")"); + l->append(")"); } }; @@ -420,26 +420,26 @@ struct ParamTraits<ExternalTabSettings> { ReadParam(m, iter, &p->referrer) && ReadParam(m, iter, &p->infobars_enabled); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.parent, l); - l->append(L", "); + l->append(", "); LogParam(p.dimensions, l); - l->append(L", "); + l->append(", "); LogParam(p.style, l); - l->append(L", "); + l->append(", "); LogParam(p.is_off_the_record, l); - l->append(L", "); + l->append(", "); LogParam(p.load_requests_via_automation, l); - l->append(L", "); + l->append(", "); LogParam(p.handle_top_level_requests, l); - l->append(L", "); + l->append(", "); LogParam(p.initial_url, l); - l->append(L", "); + l->append(", "); LogParam(p.referrer, l); - l->append(L", "); + l->append(", "); LogParam(p.infobars_enabled, l); - l->append(L")"); + l->append(")"); } }; @@ -481,26 +481,26 @@ struct ParamTraits<NavigationInfo> { ReadParam(m, iter, &p->displayed_insecure_content) && ReadParam(m, iter, &p->ran_insecure_content); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.navigation_type, l); - l->append(L", "); + l->append(", "); LogParam(p.relative_offset, l); - l->append(L", "); + l->append(", "); LogParam(p.navigation_index, l); - l->append(L", "); + l->append(", "); LogParam(p.title, l); - l->append(L", "); + l->append(", "); LogParam(p.url, l); - l->append(L", "); + l->append(", "); LogParam(p.referrer, l); - l->append(L", "); + l->append(", "); LogParam(p.security_style, l); - l->append(L", "); + l->append(", "); LogParam(p.displayed_insecure_content, l); - l->append(L", "); + l->append(", "); LogParam(p.ran_insecure_content, l); - l->append(L")"); + l->append(")"); } }; @@ -555,22 +555,22 @@ struct ParamTraits<ContextMenuParams> { ReadParam(m, iter, &p->page_url) && ReadParam(m, iter, &p->frame_url); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.screen_x, l); - l->append(L", "); + l->append(", "); LogParam(p.screen_y, l); - l->append(L", "); + l->append(", "); LogParam(p.link_url, l); - l->append(L", "); + l->append(", "); LogParam(p.unfiltered_link_url, l); - l->append(L", "); + l->append(", "); LogParam(p.src_url, l); - l->append(L", "); + l->append(", "); LogParam(p.page_url, l); - l->append(L", "); + l->append(", "); LogParam(p.frame_url, l); - l->append(L")"); + l->append(")"); } }; @@ -601,18 +601,18 @@ struct ParamTraits<AttachExternalTabParams> { ReadParam(m, iter, &p->user_gesture); } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"("); + static void Log(const param_type& p, std::string* l) { + l->append("("); LogParam(p.cookie, l); - l->append(L", "); + l->append(", "); LogParam(p.url, l); - l->append(L", "); + l->append(", "); LogParam(p.dimensions, l); - l->append(L", "); + l->append(", "); LogParam(p.disposition, l); - l->append(L", "); + l->append(", "); LogParam(p.user_gesture, l); - l->append(L")"); + l->append(")"); } }; diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index 080f96a..4493979 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -12,6 +12,7 @@ #include "base/i18n/rtl.h" #include "base/string_util.h" #include "base/sys_info.h" +#include "base/utf_string_conversions.h" #include "build/build_config.h" #include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/net/url_request_slow_http_job.h" |