diff --git a/net/dns/dns_config_service_win.cc b/net/dns/dns_config_service_win.cc index 15ae22227f7c..64b912db367c 100644 --- a/net/dns/dns_config_service_win.cc +++ b/net/dns/dns_config_service_win.cc @@ -146,7 +146,7 @@ bool ParseDomainASCII(const base::string16& widestr, std::string* domain) { // Otherwise try to convert it from IDN to punycode. const int kInitialBufferSize = 256; - url_canon::RawCanonOutputT punycode; + url_canon::RawCanonOutputT punycode; if (!url_canon::IDNToASCII(widestr.data(), widestr.length(), &punycode)) return false; diff --git a/net/http/http_auth_filter_win.h b/net/http/http_auth_filter_win.h index 24305b511ecc..d2c0af4a09dc 100644 --- a/net/http/http_auth_filter_win.h +++ b/net/http/http_auth_filter_win.h @@ -20,13 +20,13 @@ enum RegistryHiveType { namespace http_auth { // The common path to all the registry keys containing domain zone information. -extern const char16 kRegistryInternetSettings[]; -extern const char16 kSettingsMachineOnly[]; -extern const char16* kRegistryEntries[3]; // L"http", L"https", and L"*" +extern const base::char16 kRegistryInternetSettings[]; +extern const base::char16 kSettingsMachineOnly[]; +extern const base::char16* kRegistryEntries[3]; // L"http", L"https", and L"*" -extern const char16* GetRegistryWhitelistKey(); +extern const base::char16* GetRegistryWhitelistKey(); // Override the whitelist key. Passing in NULL restores the default value. -extern void SetRegistryWhitelistKey(const char16* new_whitelist_key); +extern void SetRegistryWhitelistKey(const base::char16* new_whitelist_key); extern bool UseOnlyMachineSettings(); } // namespace http_auth diff --git a/net/http/http_auth_handler_ntlm_portable.cc b/net/http/http_auth_handler_ntlm_portable.cc index 9faa85fde199..138e2881093b 100644 --- a/net/http/http_auth_handler_ntlm_portable.cc +++ b/net/http/http_auth_handler_ntlm_portable.cc @@ -211,7 +211,8 @@ static void* WriteSecBuf(void* buf, uint16 length, uint32 offset) { * to pass the same buffer as both input and output, which is a handy way to * convert the unicode buffer to little-endian on big-endian platforms. */ -static void* WriteUnicodeLE(void* buf, const char16* str, uint32 str_len) { +static void* WriteUnicodeLE( + void* buf, const base::char16* str, uint32 str_len) { // Convert input string from BE to LE. uint8* cursor = static_cast(buf); const uint8* input = reinterpret_cast(str); @@ -480,7 +481,8 @@ static int GenerateType3Msg(const base::string16& domain, ucs_domain_buf = domain; domain_ptr = ucs_domain_buf.data(); domain_len = ucs_domain_buf.length() * 2; - WriteUnicodeLE(const_cast(domain_ptr), (const char16*) domain_ptr, + WriteUnicodeLE(const_cast(domain_ptr), + (const base::char16*) domain_ptr, ucs_domain_buf.length()); #else domain_ptr = domain.data(); @@ -500,7 +502,7 @@ static int GenerateType3Msg(const base::string16& domain, ucs_user_buf = username; user_ptr = ucs_user_buf.data(); user_len = ucs_user_buf.length() * 2; - WriteUnicodeLE(const_cast(user_ptr), (const char16*) user_ptr, + WriteUnicodeLE(const_cast(user_ptr), (const base::char16*) user_ptr, ucs_user_buf.length()); #else user_ptr = username.data(); @@ -521,7 +523,7 @@ static int GenerateType3Msg(const base::string16& domain, host_ptr = ucs_host_buf.data(); host_len = ucs_host_buf.length() * 2; #ifdef IS_BIG_ENDIAN - WriteUnicodeLE(const_cast(host_ptr), (const char16*) host_ptr, + WriteUnicodeLE(const_cast(host_ptr), (const base::char16*) host_ptr, ucs_host_buf.length()); #endif } else { diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc index 4571c4eb5995..aab2432db55d 100644 --- a/net/proxy/proxy_resolver_v8.cc +++ b/net/proxy/proxy_resolver_v8.cc @@ -223,7 +223,7 @@ bool GetHostnameArgument(const v8::FunctionCallbackInfo& args, // Otherwise try to convert it from IDN to punycode. const int kInitialBufferSize = 256; - url_canon::RawCanonOutputT punycode_output; + url_canon::RawCanonOutputT punycode_output; if (!url_canon::IDNToASCII(hostname_utf16.data(), hostname_utf16.length(), &punycode_output)) { diff --git a/ppapi/proxy/pdf_resource.cc b/ppapi/proxy/pdf_resource.cc index 80c4237a5e5b..6672bac9e16e 100644 --- a/ppapi/proxy/pdf_resource.cc +++ b/ppapi/proxy/pdf_resource.cc @@ -62,8 +62,10 @@ void PDFResource::SearchString(const unsigned short* input_string, PP_PrivateFindResult** results, int* count) { if (locale_.empty()) locale_ = GetLocale(); - const char16* string = reinterpret_cast(input_string); - const char16* term = reinterpret_cast(input_term); + const base::char16* string = + reinterpret_cast(input_string); + const base::char16* term = + reinterpret_cast(input_term); UErrorCode status = U_ZERO_ERROR; UStringSearch* searcher = usearch_open(term, -1, string, -1, locale_.c_str(), diff --git a/ppapi/shared_impl/ppb_gamepad_shared.h b/ppapi/shared_impl/ppb_gamepad_shared.h index 72d53311e52f..821980f3aa72 100644 --- a/ppapi/shared_impl/ppb_gamepad_shared.h +++ b/ppapi/shared_impl/ppb_gamepad_shared.h @@ -28,7 +28,7 @@ struct WebKitGamepad { bool connected; // Device identifier (based on manufacturer, model, etc.). - char16 id[kIdLengthCap]; + base::char16 id[kIdLengthCap]; // Monotonically increasing value referring to when the data were last // updated. diff --git a/remoting/host/verify_config_window_win.cc b/remoting/host/verify_config_window_win.cc index 849d3842a366..d6793cc00673 100644 --- a/remoting/host/verify_config_window_win.cc +++ b/remoting/host/verify_config_window_win.cc @@ -108,7 +108,7 @@ bool VerifyConfigWindowWin::VerifyHostSecretHash() { // Get the PIN length. int pin_length = pin_edit.GetWindowTextLength(); - scoped_ptr pin(new char16[pin_length + 1]); + scoped_ptr pin(new base::char16[pin_length + 1]); // Get the PIN making sure it is NULL terminated even if an error occurs. int result = pin_edit.GetWindowText(pin.get(), pin_length + 1); diff --git a/remoting/host/win/launch_process_with_token.cc b/remoting/host/win/launch_process_with_token.cc index f7ce8450f661..5e9ad81a0dfe 100644 --- a/remoting/host/win/launch_process_with_token.cc +++ b/remoting/host/win/launch_process_with_token.cc @@ -291,7 +291,7 @@ bool SendCreateProcessRequest( const base::FilePath::StringType& application_name, const CommandLine::StringType& command_line, DWORD creation_flags, - const char16* desktop_name) { + const base::char16* desktop_name) { // |CreateProcessRequest| structure passes the same parameters to // the execution server as CreateProcessAsUser() function does. Strings are // stored as wide strings immediately after the structure. String pointers are @@ -374,7 +374,7 @@ bool CreateRemoteSessionProcess( const base::FilePath::StringType& application_name, const CommandLine::StringType& command_line, DWORD creation_flags, - const char16* desktop_name, + const base::char16* desktop_name, PROCESS_INFORMATION* process_information_out) { DCHECK_LT(base::win::GetVersion(), base::win::VERSION_VISTA); @@ -457,7 +457,7 @@ bool LaunchProcessWithToken(const base::FilePath& binary, SECURITY_ATTRIBUTES* thread_attributes, bool inherit_handles, DWORD creation_flags, - const char16* desktop_name, + const base::char16* desktop_name, ScopedHandle* process_out, ScopedHandle* thread_out) { base::FilePath::StringType application_name = binary.value(); @@ -466,7 +466,7 @@ bool LaunchProcessWithToken(const base::FilePath& binary, memset(&startup_info, 0, sizeof(startup_info)); startup_info.cb = sizeof(startup_info); if (desktop_name) - startup_info.lpDesktop = const_cast(desktop_name); + startup_info.lpDesktop = const_cast(desktop_name); PROCESS_INFORMATION temp_process_info = {}; BOOL result = CreateProcessAsUser(user_token, diff --git a/remoting/host/win/launch_process_with_token.h b/remoting/host/win/launch_process_with_token.h index f33c13236916..e3d11f1cff11 100644 --- a/remoting/host/win/launch_process_with_token.h +++ b/remoting/host/win/launch_process_with_token.h @@ -38,7 +38,7 @@ bool LaunchProcessWithToken(const base::FilePath& binary, SECURITY_ATTRIBUTES* thread_attributes, bool inherit_handles, DWORD creation_flags, - const char16* desktop_name, + const base::char16* desktop_name, base::win::ScopedHandle* process_out, base::win::ScopedHandle* thread_out); diff --git a/remoting/host/win/security_descriptor.cc b/remoting/host/win/security_descriptor.cc index 572df45be482..1085dd119f27 100644 --- a/remoting/host/win/security_descriptor.cc +++ b/remoting/host/win/security_descriptor.cc @@ -28,7 +28,7 @@ ScopedSd ConvertSddlToSd(const std::string& sddl) { // Converts a SID into a text string. std::string ConvertSidToString(SID* sid) { - char16* c_sid_string = NULL; + base::char16* c_sid_string = NULL; if (!ConvertSidToStringSid(sid, &c_sid_string)) return std::string(); diff --git a/sandbox/win/src/handle_closer.cc b/sandbox/win/src/handle_closer.cc index 8ab92095d178..d250ec393b73 100644 --- a/sandbox/win/src/handle_closer.cc +++ b/sandbox/win/src/handle_closer.cc @@ -34,8 +34,8 @@ SANDBOX_INTERCEPT HandleCloserInfo* g_handles_to_close; HandleCloser::HandleCloser() {} -ResultCode HandleCloser::AddHandle(const char16* handle_type, - const char16* handle_name) { +ResultCode HandleCloser::AddHandle(const base::char16* handle_type, + const base::char16* handle_name) { if (!handle_type) return SBOX_ERROR_BAD_PARAMS; @@ -61,10 +61,10 @@ size_t HandleCloser::GetBufferSize() { for (HandleMap::iterator i = handles_to_close_.begin(); i != handles_to_close_.end(); ++i) { size_t bytes_entry = offsetof(HandleListEntry, handle_type) + - (i->first.size() + 1) * sizeof(char16); + (i->first.size() + 1) * sizeof(base::char16); for (HandleMap::mapped_type::iterator j = i->second.begin(); j != i->second.end(); ++j) { - bytes_entry += ((*j).size() + 1) * sizeof(char16); + bytes_entry += ((*j).size() + 1) * sizeof(base::char16); } // Round up to the nearest multiple of word size. @@ -119,8 +119,9 @@ bool HandleCloser::SetupHandleList(void* buffer, size_t buffer_bytes) { handle_info->record_bytes = buffer_bytes; handle_info->num_handle_types = handles_to_close_.size(); - char16* output = reinterpret_cast(&handle_info->handle_entries[0]); - char16* end = reinterpret_cast( + base::char16* output = reinterpret_cast( + &handle_info->handle_entries[0]); + base::char16* end = reinterpret_cast( reinterpret_cast(buffer) + buffer_bytes); for (HandleMap::iterator i = handles_to_close_.begin(); i != handles_to_close_.end(); ++i) { diff --git a/sandbox/win/src/handle_closer.h b/sandbox/win/src/handle_closer.h index 8833b847c514..a5808d1b7a54 100644 --- a/sandbox/win/src/handle_closer.h +++ b/sandbox/win/src/handle_closer.h @@ -27,7 +27,7 @@ struct HandleListEntry { size_t record_bytes; // Rounded to sizeof(size_t) bytes. size_t offset_to_names; // Nul terminated strings of name_count names. size_t name_count; - char16 handle_type[1]; + base::char16 handle_type[1]; }; // Global parameters and a pointer to the list of entries. @@ -47,7 +47,8 @@ class HandleCloser { // Adds a handle that will be closed in the target process after lockdown. // A NULL value for handle_name indicates all handles of the specified type. // An empty string for handle_name indicates the handle is unnamed. - ResultCode AddHandle(const char16* handle_type, const char16* handle_name); + ResultCode AddHandle(const base::char16* handle_type, + const base::char16* handle_name); // Serializes and copies the closer table into the target process. bool InitializeTargetHandles(TargetProcess* target); diff --git a/sandbox/win/src/handle_closer_agent.cc b/sandbox/win/src/handle_closer_agent.cc index bc75e7322b2b..97dfb17efe4c 100644 --- a/sandbox/win/src/handle_closer_agent.cc +++ b/sandbox/win/src/handle_closer_agent.cc @@ -49,9 +49,9 @@ void HandleCloserAgent::InitializeHandlesToClose() { HandleListEntry* entry = g_handles_to_close->handle_entries; for (size_t i = 0; i < g_handles_to_close->num_handle_types; ++i) { // Set the type name. - char16* input = entry->handle_type; + base::char16* input = entry->handle_type; HandleMap::mapped_type& handle_names = handles_to_close_[input]; - input = reinterpret_cast(reinterpret_cast(entry) + input = reinterpret_cast(reinterpret_cast(entry) + entry->offset_to_names); // Grab all the handle names. for (size_t j = 0; j < entry->name_count; ++j) { @@ -65,9 +65,9 @@ void HandleCloserAgent::InitializeHandlesToClose() { entry = reinterpret_cast(reinterpret_cast(entry) + entry->record_bytes); - DCHECK(reinterpret_cast(entry) >= input); - DCHECK(reinterpret_cast(entry) - input < - sizeof(size_t) / sizeof(char16)); + DCHECK(reinterpret_cast(entry) >= input); + DCHECK(reinterpret_cast(entry) - input < + sizeof(size_t) / sizeof(base::char16)); } // Clean up the memory we copied over. diff --git a/sandbox/win/src/handle_table.cc b/sandbox/win/src/handle_table.cc index deecfac56e50..3b2febe62519 100644 --- a/sandbox/win/src/handle_table.cc +++ b/sandbox/win/src/handle_table.cc @@ -22,22 +22,22 @@ bool CompareHandleEntries(const SYSTEM_HANDLE_INFORMATION& a, namespace sandbox { -const char16* HandleTable::kTypeProcess = L"Process"; -const char16* HandleTable::kTypeThread = L"Thread"; -const char16* HandleTable::kTypeFile = L"File"; -const char16* HandleTable::kTypeDirectory = L"Directory"; -const char16* HandleTable::kTypeKey = L"Key"; -const char16* HandleTable::kTypeWindowStation = L"WindowStation"; -const char16* HandleTable::kTypeDesktop = L"Desktop"; -const char16* HandleTable::kTypeService = L"Service"; -const char16* HandleTable::kTypeMutex = L"Mutex"; -const char16* HandleTable::kTypeSemaphore = L"Semaphore"; -const char16* HandleTable::kTypeEvent = L"Event"; -const char16* HandleTable::kTypeTimer = L"Timer"; -const char16* HandleTable::kTypeNamedPipe = L"NamedPipe"; -const char16* HandleTable::kTypeJobObject = L"JobObject"; -const char16* HandleTable::kTypeFileMap = L"FileMap"; -const char16* HandleTable::kTypeAlpcPort = L"ALPC Port"; +const base::char16* HandleTable::kTypeProcess = L"Process"; +const base::char16* HandleTable::kTypeThread = L"Thread"; +const base::char16* HandleTable::kTypeFile = L"File"; +const base::char16* HandleTable::kTypeDirectory = L"Directory"; +const base::char16* HandleTable::kTypeKey = L"Key"; +const base::char16* HandleTable::kTypeWindowStation = L"WindowStation"; +const base::char16* HandleTable::kTypeDesktop = L"Desktop"; +const base::char16* HandleTable::kTypeService = L"Service"; +const base::char16* HandleTable::kTypeMutex = L"Mutex"; +const base::char16* HandleTable::kTypeSemaphore = L"Semaphore"; +const base::char16* HandleTable::kTypeEvent = L"Event"; +const base::char16* HandleTable::kTypeTimer = L"Timer"; +const base::char16* HandleTable::kTypeNamedPipe = L"NamedPipe"; +const base::char16* HandleTable::kTypeJobObject = L"JobObject"; +const base::char16* HandleTable::kTypeFileMap = L"FileMap"; +const base::char16* HandleTable::kTypeAlpcPort = L"ALPC Port"; HandleTable::HandleTable() { static NtQuerySystemInformation QuerySystemInformation = NULL; diff --git a/sandbox/win/src/handle_table.h b/sandbox/win/src/handle_table.h index e36bdb47f898..1b553fae3aa8 100644 --- a/sandbox/win/src/handle_table.h +++ b/sandbox/win/src/handle_table.h @@ -18,22 +18,22 @@ namespace sandbox { // for iterating through the table and retrieving handle info. class HandleTable { public: - static const char16* HandleTable::kTypeProcess; - static const char16* HandleTable::kTypeThread; - static const char16* HandleTable::kTypeFile; - static const char16* HandleTable::kTypeDirectory; - static const char16* HandleTable::kTypeKey; - static const char16* HandleTable::kTypeWindowStation; - static const char16* HandleTable::kTypeDesktop; - static const char16* HandleTable::kTypeService; - static const char16* HandleTable::kTypeMutex; - static const char16* HandleTable::kTypeSemaphore; - static const char16* HandleTable::kTypeEvent; - static const char16* HandleTable::kTypeTimer; - static const char16* HandleTable::kTypeNamedPipe; - static const char16* HandleTable::kTypeJobObject; - static const char16* HandleTable::kTypeFileMap; - static const char16* HandleTable::kTypeAlpcPort; + static const base::char16* HandleTable::kTypeProcess; + static const base::char16* HandleTable::kTypeThread; + static const base::char16* HandleTable::kTypeFile; + static const base::char16* HandleTable::kTypeDirectory; + static const base::char16* HandleTable::kTypeKey; + static const base::char16* HandleTable::kTypeWindowStation; + static const base::char16* HandleTable::kTypeDesktop; + static const base::char16* HandleTable::kTypeService; + static const base::char16* HandleTable::kTypeMutex; + static const base::char16* HandleTable::kTypeSemaphore; + static const base::char16* HandleTable::kTypeEvent; + static const base::char16* HandleTable::kTypeTimer; + static const base::char16* HandleTable::kTypeNamedPipe; + static const base::char16* HandleTable::kTypeJobObject; + static const base::char16* HandleTable::kTypeFileMap; + static const base::char16* HandleTable::kTypeAlpcPort; class Iterator; diff --git a/sandbox/win/src/sandbox_policy_base.cc b/sandbox/win/src/sandbox_policy_base.cc index 42006e65d277..758a8bea58c5 100644 --- a/sandbox/win/src/sandbox_policy_base.cc +++ b/sandbox/win/src/sandbox_policy_base.cc @@ -414,8 +414,8 @@ ResultCode PolicyBase::AddDllToUnload(const wchar_t* dll_name) { return SBOX_ALL_OK; } -ResultCode PolicyBase::AddKernelObjectToClose(const char16* handle_type, - const char16* handle_name) { +ResultCode PolicyBase::AddKernelObjectToClose(const base::char16* handle_type, + const base::char16* handle_name) { return handle_closer_.AddHandle(handle_type, handle_name); } diff --git a/sandbox/win/src/sandbox_policy_base.h b/sandbox/win/src/sandbox_policy_base.h index 79695061c2ff..5c267a043544 100644 --- a/sandbox/win/src/sandbox_policy_base.h +++ b/sandbox/win/src/sandbox_policy_base.h @@ -63,8 +63,9 @@ class PolicyBase : public Dispatcher, public TargetPolicy { virtual ResultCode AddRule(SubSystem subsystem, Semantics semantics, const wchar_t* pattern) OVERRIDE; virtual ResultCode AddDllToUnload(const wchar_t* dll_name); - virtual ResultCode AddKernelObjectToClose(const char16* handle_type, - const char16* handle_name) OVERRIDE; + virtual ResultCode AddKernelObjectToClose( + const base::char16* handle_type, + const base::char16* handle_name) OVERRIDE; // Dispatcher: virtual Dispatcher* OnMessageReady(IPCParams* ipc, diff --git a/tools/gdb/gdb_chrome.py b/tools/gdb/gdb_chrome.py index 2c7c3717fb41..8c5405c5d0a1 100644 --- a/tools/gdb/gdb_chrome.py +++ b/tools/gdb/gdb_chrome.py @@ -60,7 +60,7 @@ def to_string(self): return webkit.ustring_to_string(self.val['_M_dataplus']['_M_p']) pp_set.add_printer( 'string16', - '^string16|std::basic_string<(unsigned short|char16|base::char16).*>$', + '^string16|std::basic_string<(unsigned short|base::char16).*>$', String16Printer); diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc index fff75022c504..829b1c2b46ac 100644 --- a/ui/base/clipboard/clipboard_win.cc +++ b/ui/base/clipboard/clipboard_win.cc @@ -444,7 +444,7 @@ void Clipboard::ReadText(ClipboardType type, base::string16* result) const { if (!data) return; - result->assign(static_cast(::GlobalLock(data))); + result->assign(static_cast(::GlobalLock(data))); ::GlobalUnlock(data); } @@ -632,7 +632,7 @@ void Clipboard::ReadBookmark(base::string16* title, std::string* url) const { if (!data) return; - base::string16 bookmark(static_cast(::GlobalLock(data))); + base::string16 bookmark(static_cast(::GlobalLock(data))); ::GlobalUnlock(data); ParseBookmarkClipboardFormat(bookmark, title, url); diff --git a/ui/base/ime/chromeos/character_composer_unittest.cc b/ui/base/ime/chromeos/character_composer_unittest.cc index 6853a1df9cc7..78bf846bdc4d 100644 --- a/ui/base/ime/chromeos/character_composer_unittest.cc +++ b/ui/base/ime/chromeos/character_composer_unittest.cc @@ -288,7 +288,7 @@ TEST_F(CharacterComposerTest, HexadecimalComposition) { GDK_KEY_2, GDK_KEY_space, 0, base::string16(1, 0x3042)); // MUSICAL KEYBOARD (U+1F3B9) - const char16 kMusicalKeyboard[] = {0xd83c, 0xdfb9}; + const base::char16 kMusicalKeyboard[] = {0xd83c, 0xdfb9}; ExpectKeyFiltered(&character_composer, GDK_KEY_U, EF_SHIFT_DOWN | EF_CONTROL_DOWN); ExpectCharacterComposed(&character_composer, GDK_KEY_1, GDK_KEY_f, GDK_KEY_3, diff --git a/ui/base/ime/dummy_text_input_client.cc b/ui/base/ime/dummy_text_input_client.cc index 5dbd69b0d8cb..711dfddb58ab 100644 --- a/ui/base/ime/dummy_text_input_client.cc +++ b/ui/base/ime/dummy_text_input_client.cc @@ -26,7 +26,7 @@ void DummyTextInputClient::ClearCompositionText() { void DummyTextInputClient::InsertText(const base::string16& text) { } -void DummyTextInputClient::InsertChar(char16 ch, int flags) { +void DummyTextInputClient::InsertChar(base::char16 ch, int flags) { } gfx::NativeWindow DummyTextInputClient::GetAttachedWindow() const { diff --git a/ui/base/ime/dummy_text_input_client.h b/ui/base/ime/dummy_text_input_client.h index b2ebe641a3d0..5c8a52efbfbe 100644 --- a/ui/base/ime/dummy_text_input_client.h +++ b/ui/base/ime/dummy_text_input_client.h @@ -21,7 +21,7 @@ class DummyTextInputClient : public TextInputClient { virtual void ConfirmCompositionText() OVERRIDE; virtual void ClearCompositionText() OVERRIDE; virtual void InsertText(const base::string16& text) OVERRIDE; - virtual void InsertChar(char16 ch, int flags) OVERRIDE; + virtual void InsertChar(base::char16 ch, int flags) OVERRIDE; virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE; virtual ui::TextInputType GetTextInputType() const OVERRIDE; virtual ui::TextInputMode GetTextInputMode() const OVERRIDE; diff --git a/ui/base/ime/input_method_ibus_unittest.cc b/ui/base/ime/input_method_ibus_unittest.cc index 2c204f999216..6a6ebee61212 100644 --- a/ui/base/ime/input_method_ibus_unittest.cc +++ b/ui/base/ime/input_method_ibus_unittest.cc @@ -262,7 +262,7 @@ class InputMethodIBusTest : public internal::InputMethodDelegate, virtual void InsertText(const base::string16& text) OVERRIDE { inserted_text_ = text; } - virtual void InsertChar(char16 ch, int flags) OVERRIDE { + virtual void InsertChar(base::char16 ch, int flags) OVERRIDE { inserted_char_ = ch; inserted_char_flags_ = flags; } @@ -362,7 +362,7 @@ class InputMethodIBusTest : public internal::InputMethodDelegate, CompositionText composition_text_; CompositionText confirmed_text_; base::string16 inserted_text_; - char16 inserted_char_; + base::char16 inserted_char_; unsigned int on_input_method_changed_call_count_; int inserted_char_flags_; diff --git a/ui/base/ime/input_method_win.cc b/ui/base/ime/input_method_win.cc index cae6c5c5a172..ac9a1ad95497 100644 --- a/ui/base/ime/input_method_win.cc +++ b/ui/base/ime/input_method_win.cc @@ -134,8 +134,8 @@ LRESULT InputMethodWin::OnChar(HWND window_handle, // We need to send character events to the focused text input client event if // its text input type is ui::TEXT_INPUT_TYPE_NONE. if (GetTextInputClient()) { - const char16 kCarriageReturn = L'\r'; - const char16 ch = static_cast(wparam); + const base::char16 kCarriageReturn = L'\r'; + const base::char16 ch = static_cast(wparam); // A mask to determine the previous key state from |lparam|. The value is 1 // if the key is down before the message is sent, or it is 0 if the key is // up. diff --git a/ui/base/ime/remote_input_method_win.cc b/ui/base/ime/remote_input_method_win.cc index fd86059622b3..b03a57404c0d 100644 --- a/ui/base/ime/remote_input_method_win.cc +++ b/ui/base/ime/remote_input_method_win.cc @@ -190,7 +190,7 @@ class RemoteInputMethodWin : public InputMethod, if (!text_input_client_) return false; text_input_client_->InsertChar( - static_cast(native_key_event.wParam), + static_cast(native_key_event.wParam), ui::GetModifiersFromKeyState()); return true; } diff --git a/ui/base/ime/remote_input_method_win_unittest.cc b/ui/base/ime/remote_input_method_win_unittest.cc index a1f1ccc02e1d..f3100d0fb2af 100644 --- a/ui/base/ime/remote_input_method_win_unittest.cc +++ b/ui/base/ime/remote_input_method_win_unittest.cc @@ -90,11 +90,11 @@ class MockTextInputClient : public DummyTextInputClient { const ui::CompositionText& composition) OVERRIDE { ++call_count_set_composition_text_; } - virtual void InsertChar(char16 ch, int flags) OVERRIDE{ + virtual void InsertChar(base::char16 ch, int flags) OVERRIDE { inserted_text_.append(1, ch); ++call_count_insert_char_; } - virtual void InsertText(const base::string16& text) OVERRIDE{ + virtual void InsertText(const base::string16& text) OVERRIDE { inserted_text_.append(text); ++call_count_insert_text_; } diff --git a/ui/base/ime/win/imm32_manager.cc b/ui/base/ime/win/imm32_manager.cc index 6cb0a32bf8b2..76a9af05bb93 100644 --- a/ui/base/ime/win/imm32_manager.cc +++ b/ui/base/ime/win/imm32_manager.cc @@ -24,7 +24,7 @@ // Following code requires wchar_t to be same as char16. It should always be // true on Windows. -COMPILE_ASSERT(sizeof(wchar_t) == sizeof(char16), wchar_t__char16_diff); +COMPILE_ASSERT(sizeof(wchar_t) == sizeof(base::char16), wchar_t__char16_diff); /////////////////////////////////////////////////////////////////////////////// // IMM32Manager diff --git a/ui/base/ime/win/tsf_text_store_unittest.cc b/ui/base/ime/win/tsf_text_store_unittest.cc index 48f4c24ea8ef..ea43103171bc 100644 --- a/ui/base/ime/win/tsf_text_store_unittest.cc +++ b/ui/base/ime/win/tsf_text_store_unittest.cc @@ -30,7 +30,7 @@ class MockTextInputClient : public TextInputClient { MOCK_METHOD0(ConfirmCompositionText, void()); MOCK_METHOD0(ClearCompositionText, void()); MOCK_METHOD1(InsertText, void(const base::string16&)); - MOCK_METHOD2(InsertChar, void(char16, int)); + MOCK_METHOD2(InsertChar, void(base::char16, int)); MOCK_CONST_METHOD0(GetAttachedWindow, gfx::NativeWindow()); MOCK_CONST_METHOD0(GetTextInputType, ui::TextInputType()); MOCK_CONST_METHOD0(GetTextInputMode, ui::TextInputMode()); diff --git a/ui/base/l10n/l10n_util_mac.mm b/ui/base/l10n/l10n_util_mac.mm index b2e3cf852047..8d6ca7030737 100644 --- a/ui/base/l10n/l10n_util_mac.mm +++ b/ui/base/l10n/l10n_util_mac.mm @@ -54,12 +54,12 @@ void OverrideLocaleWithCocoaLocale() { // Remove the Windows-style accelerator marker and change "..." into an // ellipsis. Returns the result in an autoreleased NSString. NSString* FixUpWindowsStyleLabel(const base::string16& label) { - const char16 kEllipsisUTF16 = 0x2026; + const base::char16 kEllipsisUTF16 = 0x2026; base::string16 ret; size_t label_len = label.length(); ret.reserve(label_len); for (size_t i = 0; i < label_len; ++i) { - char16 c = label[i]; + base::char16 c = label[i]; if (c == '(' && i + 3 < label_len && label[i + 1] == '&' && label[i + 3] == ')') { // Strip '(&?)' patterns which means Windows-style accelerator in some diff --git a/ui/base/l10n/l10n_util_unittest.cc b/ui/base/l10n/l10n_util_unittest.cc index a19563b74eae..3cf70251edf9 100644 --- a/ui/base/l10n/l10n_util_unittest.cc +++ b/ui/base/l10n/l10n_util_unittest.cc @@ -335,7 +335,7 @@ void CheckUiDisplayNameForLocale(const std::string& locale, bool rtl_direction = true; for (size_t i = 0; i < result.length() - 1; i++) { - char16 ch = result.at(i); + base::char16 ch = result.at(i); switch (ch) { case base::i18n::kLeftToRightMark: case base::i18n::kLeftToRightEmbeddingMark: @@ -391,7 +391,7 @@ TEST_F(L10nUtilTest, GetDisplayNameForLocale) { // ToUpper and ToLower should work with embedded NULLs. const size_t length_with_null = 4; - char16 buf_with_null[length_with_null] = { 0, 'a', 0, 'b' }; + base::char16 buf_with_null[length_with_null] = { 0, 'a', 0, 'b' }; base::string16 string16_with_null(buf_with_null, length_with_null); base::string16 upper_with_null = base::i18n::ToUpper(string16_with_null); diff --git a/ui/gfx/render_text_unittest.cc b/ui/gfx/render_text_unittest.cc index cfa5fe62acb9..09d60fcc1c23 100644 --- a/ui/gfx/render_text_unittest.cc +++ b/ui/gfx/render_text_unittest.cc @@ -286,10 +286,10 @@ TEST_F(RenderTextTest, ObscuredText) { render_text->SetObscured(true); // Surrogate pairs are counted as one code point. - const char16 invalid_surrogates[] = {0xDC00, 0xD800, 0}; + const base::char16 invalid_surrogates[] = {0xDC00, 0xD800, 0}; render_text->SetText(invalid_surrogates); EXPECT_EQ(ASCIIToUTF16("**"), render_text->GetLayoutText()); - const char16 valid_surrogates[] = {0xD800, 0xDC00, 0}; + const base::char16 valid_surrogates[] = {0xD800, 0xDC00, 0}; render_text->SetText(valid_surrogates); EXPECT_EQ(ASCIIToUTF16("*"), render_text->GetLayoutText()); EXPECT_EQ(0U, render_text->cursor_position()); @@ -373,32 +373,34 @@ TEST_F(RenderTextTest, RevealObscuredText) { EXPECT_EQ(ASCIIToUTF16("**********"), render_text->GetLayoutText()); // Text with invalid surrogates. - const char16 invalid_surrogates[] = {0xDC00, 0xD800, 'h', 'o', 'p', 0}; + const base::char16 invalid_surrogates[] = {0xDC00, 0xD800, 'h', 'o', 'p', 0}; render_text->SetText(invalid_surrogates); EXPECT_EQ(ASCIIToUTF16("*****"), render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(0); - const char16 invalid_expect_0[] = {0xDC00, '*', '*', '*', '*', 0}; + const base::char16 invalid_expect_0[] = {0xDC00, '*', '*', '*', '*', 0}; EXPECT_EQ(invalid_expect_0, render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(1); - const char16 invalid_expect_1[] = {'*', 0xD800, '*', '*', '*', 0}; + const base::char16 invalid_expect_1[] = {'*', 0xD800, '*', '*', '*', 0}; EXPECT_EQ(invalid_expect_1, render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(2); EXPECT_EQ(ASCIIToUTF16("**h**"), render_text->GetLayoutText()); // Text with valid surrogates before and after the reveal index. - const char16 valid_surrogates[] = + const base::char16 valid_surrogates[] = {0xD800, 0xDC00, 'h', 'o', 'p', 0xD800, 0xDC00, 0}; render_text->SetText(valid_surrogates); EXPECT_EQ(ASCIIToUTF16("*****"), render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(0); - const char16 valid_expect_0_and_1[] = {0xD800, 0xDC00, '*', '*', '*', '*', 0}; + const base::char16 valid_expect_0_and_1[] = + {0xD800, 0xDC00, '*', '*', '*', '*', 0}; EXPECT_EQ(valid_expect_0_and_1, render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(1); EXPECT_EQ(valid_expect_0_and_1, render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(2); EXPECT_EQ(ASCIIToUTF16("*h***"), render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(5); - const char16 valid_expect_5_and_6[] = {'*', '*', '*', '*', 0xD800, 0xDC00, 0}; + const base::char16 valid_expect_5_and_6[] = + {'*', '*', '*', '*', 0xD800, 0xDC00, 0}; EXPECT_EQ(valid_expect_5_and_6, render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(6); EXPECT_EQ(valid_expect_5_and_6, render_text->GetLayoutText()); @@ -1367,8 +1369,8 @@ TEST_F(RenderTextTest, GetTextOffsetHorizontalDefaultInRTL) { TEST_F(RenderTextTest, SameFontForParentheses) { struct { - const char16 left_char; - const char16 right_char; + const base::char16 left_char; + const base::char16 right_char; } punctuation_pairs[] = { { '(', ')' }, { '{', '}' }, diff --git a/ui/gfx/render_text_win.cc b/ui/gfx/render_text_win.cc index 881c8b66d196..92e853fd76b1 100644 --- a/ui/gfx/render_text_win.cc +++ b/ui/gfx/render_text_win.cc @@ -122,7 +122,7 @@ void DeriveFontIfNecessary(int font_size, } // Returns true if |c| is a Unicode BiDi control character. -bool IsUnicodeBidiControlCharacter(char16 c) { +bool IsUnicodeBidiControlCharacter(base::char16 c) { return c == base::i18n::kRightToLeftMark || c == base::i18n::kLeftToRightMark || c == base::i18n::kLeftToRightEmbeddingMark || diff --git a/ui/gfx/text_elider_unittest.cc b/ui/gfx/text_elider_unittest.cc index e8a5aab77f80..455275b03d2a 100644 --- a/ui/gfx/text_elider_unittest.cc +++ b/ui/gfx/text_elider_unittest.cc @@ -384,8 +384,8 @@ TEST(TextEliderTest, ElideTextEllipsis) { // Checks that all occurrences of |first_char| are followed by |second_char| and // all occurrences of |second_char| are preceded by |first_char| in |text|. static void CheckSurrogatePairs(const base::string16& text, - char16 first_char, - char16 second_char) { + base::char16 first_char, + base::char16 second_char) { size_t index = text.find_first_of(first_char); while (index != base::string16::npos) { EXPECT_LT(index, text.length() - 1); @@ -408,8 +408,8 @@ TEST(TextEliderTest, ElideTextSurrogatePairs) { const base::string16 kTestString = UTF8ToUTF16(kSurrogate + "ab" + kSurrogate + kSurrogate + "cd"); const float kTestStringWidth = GetStringWidthF(kTestString, font_list); - const char16 kSurrogateFirstChar = kTestString[0]; - const char16 kSurrogateSecondChar = kTestString[1]; + const base::char16 kSurrogateFirstChar = kTestString[0]; + const base::char16 kSurrogateSecondChar = kTestString[1]; base::string16 result; // Elide |kTextString| to all possible widths and check that no instance of diff --git a/ui/gfx/text_utils_unittest.cc b/ui/gfx/text_utils_unittest.cc index 083f4232eb45..74c3ad4dc8f1 100644 --- a/ui/gfx/text_utils_unittest.cc +++ b/ui/gfx/text_utils_unittest.cc @@ -10,7 +10,7 @@ namespace gfx { namespace { -const char16 kAcceleratorChar = '&'; +const base::char16 kAcceleratorChar = '&'; TEST(TextUtilsTest, RemoveAcceleratorChar) { struct TestData { diff --git a/ui/gfx/utf16_indexing_unittest.cc b/ui/gfx/utf16_indexing_unittest.cc index e17bdc8043ef..f93d66936600 100644 --- a/ui/gfx/utf16_indexing_unittest.cc +++ b/ui/gfx/utf16_indexing_unittest.cc @@ -9,7 +9,8 @@ namespace gfx { TEST(UTF16IndexingTest, IndexOffsetConversions) { // Valid surrogate pair surrounded by unpaired surrogates - const char16 foo[] = {0xDC00, 0xD800, 0xD800, 0xDFFF, 0xDFFF, 0xDBFF, 0}; + const base::char16 foo[] = + {0xDC00, 0xD800, 0xD800, 0xDFFF, 0xDFFF, 0xDBFF, 0}; const base::string16 s(foo); const size_t the_invalid_index = 3; for (size_t i = 0; i <= s.length(); ++i) diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc index 12922a71861c..38d35e4cbace 100644 --- a/ui/views/controls/menu/menu_controller.cc +++ b/ui/views/controls/menu/menu_controller.cc @@ -87,13 +87,13 @@ const int kBubbleTipSizeTopBottom = 11; const float kMaximumLengthMovedToActivate = 4.0f; // Returns true if the mnemonic of |menu| matches key. -bool MatchesMnemonic(MenuItemView* menu, char16 key) { +bool MatchesMnemonic(MenuItemView* menu, base::char16 key) { return menu->GetMnemonic() == key; } // Returns true if |menu| doesn't have a mnemonic and first character of the its // title is |key|. -bool TitleMatchesMnemonic(MenuItemView* menu, char16 key) { +bool TitleMatchesMnemonic(MenuItemView* menu, base::char16 key) { if (menu->GetMnemonic()) return false; @@ -1038,7 +1038,7 @@ bool MenuController::Dispatch(const MSG& msg) { return result; } case WM_CHAR: - return !SelectByChar(static_cast(msg.wParam)); + return !SelectByChar(static_cast(msg.wParam)); case WM_KEYUP: return true; @@ -2046,8 +2046,8 @@ void MenuController::CloseSubmenu() { MenuController::SelectByCharDetails MenuController::FindChildForMnemonic( MenuItemView* parent, - char16 key, - bool (*match_function)(MenuItemView* menu, char16 mnemonic)) { + base::char16 key, + bool (*match_function)(MenuItemView* menu, base::char16 mnemonic)) { SubmenuView* submenu = parent->GetSubmenu(); DCHECK(submenu); SelectByCharDetails details; @@ -2098,9 +2098,9 @@ bool MenuController::AcceptOrSelect(MenuItemView* parent, return false; } -bool MenuController::SelectByChar(char16 character) { - char16 char_array[] = { character, 0 }; - char16 key = base::i18n::ToLower(char_array)[0]; +bool MenuController::SelectByChar(base::char16 character) { + base::char16 char_array[] = { character, 0 }; + base::char16 key = base::i18n::ToLower(char_array)[0]; MenuItemView* item = pending_state_.item; if (!item->HasSubmenu() || !item->GetSubmenu()->IsShowing()) item = item->GetParentMenuItem(); diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h index 1404d54e5d61..6dc77feddc67 100644 --- a/ui/views/controls/menu/menu_controller.h +++ b/ui/views/controls/menu/menu_controller.h @@ -416,8 +416,8 @@ class VIEWS_EXPORT MenuController : public base::MessageLoop::Dispatcher, // |match_function| is used to determine which menus match. SelectByCharDetails FindChildForMnemonic( MenuItemView* parent, - char16 key, - bool (*match_function)(MenuItemView* menu, char16 mnemonic)); + base::char16 key, + bool (*match_function)(MenuItemView* menu, base::char16 mnemonic)); // Selects or accepts the appropriate menu item based on |details|. Returns // true if |Accept| was invoked (which happens if there aren't multiple item @@ -426,7 +426,7 @@ class VIEWS_EXPORT MenuController : public base::MessageLoop::Dispatcher, // Selects by mnemonic, and if that doesn't work tries the first character of // the title. Returns true if a match was selected and the menu should exit. - bool SelectByChar(char16 key); + bool SelectByChar(base::char16 key); // For Windows and Aura we repost an event for some events that dismiss // the context menu. The event is then reprocessed to cause its result diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc index 97a43cc7109a..4cc61007d09e 100644 --- a/ui/views/controls/menu/menu_item_view.cc +++ b/ui/views/controls/menu/menu_item_view.cc @@ -195,7 +195,7 @@ base::string16 MenuItemView::GetAccessibleNameForMenuItem( // Filter out the "&" for accessibility clients. size_t index = 0; - const char16 amp = '&'; + const base::char16 amp = '&'; while ((index = accessible_name.find(amp, index)) != base::string16::npos && index + 1 < accessible_name.length()) { accessible_name.replace(index, accessible_name.length() - index, @@ -442,7 +442,7 @@ const MenuItemView* MenuItemView::GetRootMenuItem() const { return item; } -char16 MenuItemView::GetMnemonic() { +base::char16 MenuItemView::GetMnemonic() { if (!GetRootMenuItem()->has_mnemonics_) return 0; @@ -451,7 +451,7 @@ char16 MenuItemView::GetMnemonic() { index = title_.find('&', index); if (index != base::string16::npos) { if (index + 1 != title_.size() && title_[index + 1] != '&') { - char16 char_array[] = { title_[index + 1], 0 }; + base::char16 char_array[] = { title_[index + 1], 0 }; // TODO(jshin): What about Turkish locale? See http://crbug.com/81719. // If the mnemonic is capital I and the UI language is Turkish, // lowercasing it results in 'small dotless i', which is different diff --git a/ui/views/controls/menu/menu_item_view.h b/ui/views/controls/menu/menu_item_view.h index 118d94935351..3dcb70e52edf 100644 --- a/ui/views/controls/menu/menu_item_view.h +++ b/ui/views/controls/menu/menu_item_view.h @@ -297,7 +297,7 @@ class VIEWS_EXPORT MenuItemView : public View { // Returns the mnemonic for this MenuItemView, or 0 if this MenuItemView // doesn't have a mnemonic. - char16 GetMnemonic(); + base::char16 GetMnemonic(); // Do we have icons? This only has effect on the top menu. Turning this on // makes the menus slightly wider and taller. diff --git a/ui/views/controls/message_box_view.cc b/ui/views/controls/message_box_view.cc index 284b6d545df8..135ee542c227 100644 --- a/ui/views/controls/message_box_view.cc +++ b/ui/views/controls/message_box_view.cc @@ -36,7 +36,7 @@ const int kDefaultMessageWidth = 320; // 001C..001E ; B # Cc [3] .. // 0085 ; B # Cc // 2029 ; B # Zp PARAGRAPH SEPARATOR -bool IsParagraphSeparator(char16 c) { +bool IsParagraphSeparator(base::char16 c) { return ( c == 0x000A || c == 0x000D || c == 0x001C || c == 0x001D || c == 0x001E || c == 0x0085 || c == 0x2029); } diff --git a/ui/views/controls/prefix_selector.cc b/ui/views/controls/prefix_selector.cc index 538972fa6450..aaedcb84bc10 100644 --- a/ui/views/controls/prefix_selector.cc +++ b/ui/views/controls/prefix_selector.cc @@ -51,7 +51,7 @@ void PrefixSelector::InsertText(const base::string16& text) { OnTextInput(text); } -void PrefixSelector::InsertChar(char16 ch, int flags) { +void PrefixSelector::InsertChar(base::char16 ch, int flags) { OnTextInput(base::string16(1, ch)); } diff --git a/ui/views/controls/prefix_selector.h b/ui/views/controls/prefix_selector.h index 0ae3cfef4121..a7ba50767171 100644 --- a/ui/views/controls/prefix_selector.h +++ b/ui/views/controls/prefix_selector.h @@ -30,7 +30,7 @@ class VIEWS_EXPORT PrefixSelector : public ui::TextInputClient { virtual void ConfirmCompositionText() OVERRIDE; virtual void ClearCompositionText() OVERRIDE; virtual void InsertText(const base::string16& text) OVERRIDE; - virtual void InsertChar(char16 ch, int flags) OVERRIDE; + virtual void InsertChar(base::char16 ch, int flags) OVERRIDE; virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE; virtual ui::TextInputType GetTextInputType() const OVERRIDE; virtual ui::TextInputMode GetTextInputMode() const OVERRIDE; diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc index a69a54b610b2..d5f23f97fa39 100644 --- a/ui/views/controls/textfield/native_textfield_views.cc +++ b/ui/views/controls/textfield/native_textfield_views.cc @@ -909,7 +909,7 @@ void NativeTextfieldViews::InsertText(const base::string16& text) { OnAfterUserAction(); } -void NativeTextfieldViews::InsertChar(char16 ch, int flags) { +void NativeTextfieldViews::InsertChar(base::char16 ch, int flags) { if (GetTextInputType() == ui::TEXT_INPUT_TYPE_NONE || !ShouldInsertChar(ch, flags)) { return; @@ -1484,7 +1484,7 @@ bool NativeTextfieldViews::ImeEditingAllowed() const { } // static -bool NativeTextfieldViews::ShouldInsertChar(char16 ch, int flags) { +bool NativeTextfieldViews::ShouldInsertChar(base::char16 ch, int flags) { // Filter out all control characters, including tab and new line characters, // and all characters with Alt modifier. But we need to allow characters with // AltGr modifier. diff --git a/ui/views/controls/textfield/native_textfield_views.h b/ui/views/controls/textfield/native_textfield_views.h index e154de21acd8..af22492c4aa2 100644 --- a/ui/views/controls/textfield/native_textfield_views.h +++ b/ui/views/controls/textfield/native_textfield_views.h @@ -231,7 +231,7 @@ class VIEWS_EXPORT NativeTextfieldViews : public View, virtual void ConfirmCompositionText() OVERRIDE; virtual void ClearCompositionText() OVERRIDE; virtual void InsertText(const base::string16& text) OVERRIDE; - virtual void InsertChar(char16 ch, int flags) OVERRIDE; + virtual void InsertChar(base::char16 ch, int flags) OVERRIDE; virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE; virtual ui::TextInputType GetTextInputType() const OVERRIDE; virtual ui::TextInputMode GetTextInputMode() const OVERRIDE; @@ -332,7 +332,7 @@ class VIEWS_EXPORT NativeTextfieldViews : public View, // Checks if a char is ok to be inserted into the textfield. The |ch| is a // modified character, i.e., modifiers took effect when generating this char. - static bool ShouldInsertChar(char16 ch, int flags); + static bool ShouldInsertChar(base::char16 ch, int flags); void CreateTouchSelectionControllerAndNotifyIt(); diff --git a/ui/views/controls/textfield/native_textfield_views_unittest.cc b/ui/views/controls/textfield/native_textfield_views_unittest.cc index eb49e6b83cec..202d1033ea7f 100644 --- a/ui/views/controls/textfield/native_textfield_views_unittest.cc +++ b/ui/views/controls/textfield/native_textfield_views_unittest.cc @@ -51,7 +51,7 @@ using base::WideToUTF16; namespace { -const char16 kHebrewLetterSamekh = 0x05E1; +const base::char16 kHebrewLetterSamekh = 0x05E1; // A Textfield wrapper to intercept OnKey[Pressed|Released]() ressults. class TestTextfield : public views::Textfield { @@ -236,7 +236,7 @@ class NativeTextfieldViewsTest : public ViewsTestBase, SendKeyEvent(key_code, false, false); } - void SendKeyEvent(char16 ch) { + void SendKeyEvent(base::char16 ch) { if (ch < 0x80) { ui::KeyboardCode code = ch == ' ' ? ui::VKEY_SPACE : @@ -1808,7 +1808,7 @@ TEST_F(NativeTextfieldViewsTest, GetCompositionCharacterBoundsTest) { TEST_F(NativeTextfieldViewsTest, GetCompositionCharacterBounds_ComplexText) { InitTextfield(Textfield::STYLE_DEFAULT); - const char16 kUtf16Chars[] = { + const base::char16 kUtf16Chars[] = { // U+0020 SPACE 0x0020, // U+1F408 (CAT) as surrogate pair diff --git a/ui/views/controls/textfield/textfield_views_model.h b/ui/views/controls/textfield/textfield_views_model.h index 4e625c4d2d65..bc1de8857529 100644 --- a/ui/views/controls/textfield/textfield_views_model.h +++ b/ui/views/controls/textfield/textfield_views_model.h @@ -82,7 +82,7 @@ class VIEWS_EXPORT TextfieldViewsModel { } // Inserts a character at the current cursor position. - void InsertChar(char16 c) { + void InsertChar(base::char16 c) { InsertTextInternal(base::string16(&c, 1), true); } @@ -93,7 +93,7 @@ class VIEWS_EXPORT TextfieldViewsModel { } // Replaces the char at the current position with given character. - void ReplaceChar(char16 c) { + void ReplaceChar(base::char16 c) { ReplaceTextInternal(base::string16(&c, 1), true); } diff --git a/ui/views/ime/input_method_bridge.cc b/ui/views/ime/input_method_bridge.cc index e9bc4597a7d8..fcc59161a302 100644 --- a/ui/views/ime/input_method_bridge.cc +++ b/ui/views/ime/input_method_bridge.cc @@ -198,7 +198,7 @@ void InputMethodBridge::InsertText(const base::string16& text) { client->InsertText(text); } -void InputMethodBridge::InsertChar(char16 ch, int flags) { +void InputMethodBridge::InsertChar(base::char16 ch, int flags) { TextInputClient* client = GetTextInputClient(); if (client) client->InsertChar(ch, flags); diff --git a/ui/views/ime/input_method_bridge.h b/ui/views/ime/input_method_bridge.h index 056c9a2e0eb7..5c0e697a54e3 100644 --- a/ui/views/ime/input_method_bridge.h +++ b/ui/views/ime/input_method_bridge.h @@ -54,7 +54,7 @@ class InputMethodBridge : public InputMethodBase, virtual void ConfirmCompositionText() OVERRIDE; virtual void ClearCompositionText() OVERRIDE; virtual void InsertText(const base::string16& text) OVERRIDE; - virtual void InsertChar(char16 ch, int flags) OVERRIDE; + virtual void InsertChar(base::char16 ch, int flags) OVERRIDE; virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE; virtual ui::TextInputType GetTextInputType() const OVERRIDE; virtual ui::TextInputMode GetTextInputMode() const OVERRIDE; diff --git a/ui/views/ime/mock_input_method.cc b/ui/views/ime/mock_input_method.cc index a66ca5d58eda..9188b74ca749 100644 --- a/ui/views/ime/mock_input_method.cc +++ b/ui/views/ime/mock_input_method.cc @@ -88,7 +88,7 @@ void MockInputMethod::DispatchKeyEvent(const ui::KeyEvent& key) { client->ClearCompositionText(); } } else if (key.type() == ui::ET_KEY_PRESSED) { - char16 ch = key.GetCharacter(); + base::char16 ch = key.GetCharacter(); client->InsertChar(ch, key.flags()); } } diff --git a/url/url_test_utils.h b/url/url_test_utils.h index 6efdeea10607..64b4acbeaf33 100644 --- a/url/url_test_utils.h +++ b/url/url_test_utils.h @@ -23,7 +23,7 @@ inline base::string16 WStringToUTF16(const wchar_t* src) { base::string16 str; int length = static_cast(wcslen(src)); for (int i = 0; i < length; ++i) { - str.push_back(static_cast(src[i])); + str.push_back(static_cast(src[i])); } return str; }