diff options
Diffstat (limited to 'chrome/browser')
37 files changed, 78 insertions, 73 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_input.cc b/chrome/browser/autocomplete/autocomplete_input.cc index a2b637e..56e1efa 100644 --- a/chrome/browser/autocomplete/autocomplete_input.cc +++ b/chrome/browser/autocomplete/autocomplete_input.cc @@ -474,7 +474,7 @@ base::string16 AutocompleteInput::FormattedStringWithEquivalentMeaning( const base::string16& formatted_url) { if (!net::CanStripTrailingSlash(url)) return formatted_url; - const base::string16 url_with_path(formatted_url + char16('/')); + const base::string16 url_with_path(formatted_url + base::char16('/')); return (AutocompleteInput::Parse(formatted_url, base::string16(), NULL, NULL, NULL) == AutocompleteInput::Parse(url_with_path, base::string16(), NULL, NULL, diff --git a/chrome/browser/autocomplete/autocomplete_match.cc b/chrome/browser/autocomplete/autocomplete_match.cc index 768d32f..e0a2ada 100644 --- a/chrome/browser/autocomplete/autocomplete_match.cc +++ b/chrome/browser/autocomplete/autocomplete_match.cc @@ -31,7 +31,7 @@ bool IsTrivialClassification(const ACMatchClassifications& classifications) { // AutocompleteMatch ---------------------------------------------------------- // static -const char16 AutocompleteMatch::kInvalidChars[] = { +const base::char16 AutocompleteMatch::kInvalidChars[] = { '\n', '\r', '\t', 0x2028, // Line separator 0x2029, // Paragraph separator diff --git a/chrome/browser/autocomplete/autocomplete_match.h b/chrome/browser/autocomplete/autocomplete_match.h index ad91c259a..26a9c25 100644 --- a/chrome/browser/autocomplete/autocomplete_match.h +++ b/chrome/browser/autocomplete/autocomplete_match.h @@ -79,7 +79,7 @@ struct AutocompleteMatch { // Null-terminated array of characters that are not valid within |contents| // and |description| strings. - static const char16 kInvalidChars[]; + static const base::char16 kInvalidChars[]; AutocompleteMatch(); AutocompleteMatch(AutocompleteProvider* provider, diff --git a/chrome/browser/autocomplete/autocomplete_provider.cc b/chrome/browser/autocomplete/autocomplete_provider.cc index 488741e..76f5074 100644 --- a/chrome/browser/autocomplete/autocomplete_provider.cc +++ b/chrome/browser/autocomplete/autocomplete_provider.cc @@ -214,7 +214,7 @@ size_t AutocompleteProvider::TrimHttpPrefix(base::string16* url) { if (!AutocompleteInput::HasHTTPScheme(*url)) return 0; size_t scheme_pos = - url->find(base::ASCIIToUTF16(content::kHttpScheme) + char16(':')); + url->find(base::ASCIIToUTF16(content::kHttpScheme) + base::char16(':')); DCHECK_NE(base::string16::npos, scheme_pos); // Erase scheme plus up to two slashes. diff --git a/chrome/browser/autocomplete/extension_app_provider.cc b/chrome/browser/autocomplete/extension_app_provider.cc index 88efea6..d6624fc 100644 --- a/chrome/browser/autocomplete/extension_app_provider.cc +++ b/chrome/browser/autocomplete/extension_app_provider.cc @@ -118,7 +118,7 @@ void ExtensionAppProvider::Start(const AutocompleteInput& input, base::string16::const_iterator name_iter = std::search(name.begin(), name.end(), input.text().begin(), input.text().end(), - base::CaseInsensitiveCompare<char16>()); + base::CaseInsensitiveCompare<base::char16>()); bool matches_name = name_iter != name.end(); size_t name_match_index = matches_name ? static_cast<size_t>(name_iter - name.begin()) : base::string16::npos; @@ -130,7 +130,7 @@ void ExtensionAppProvider::Start(const AutocompleteInput& input, base::string16::const_iterator url_iter = std::search(url.begin(), url.end(), input.text().begin(), input.text().end(), - base::CaseInsensitiveCompare<char16>()); + base::CaseInsensitiveCompare<base::char16>()); matches_url = url_iter != url.end() && input.type() != AutocompleteInput::FORCED_QUERY; url_match_index = matches_url ? diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc index db57dfb..9685201 100644 --- a/chrome/browser/autocomplete/search_provider.cc +++ b/chrome/browser/autocomplete/search_provider.cc @@ -429,7 +429,7 @@ AutocompleteMatch SearchProvider::CreateSearchSuggestion( if (input.type() == AutocompleteInput::FORCED_QUERY) match.fill_into_edit.assign(base::ASCIIToUTF16("?")); if (is_keyword) - match.fill_into_edit.append(match.keyword + char16(' ')); + match.fill_into_edit.append(match.keyword + base::char16(' ')); if (!input.prevent_inline_autocomplete() && StartsWith(query_string, input_text, false)) { match.inline_autocompletion = query_string.substr(input_text.length()); diff --git a/chrome/browser/autocomplete/search_provider_unittest.cc b/chrome/browser/autocomplete/search_provider_unittest.cc index 9d96424..579f31b 100644 --- a/chrome/browser/autocomplete/search_provider_unittest.cc +++ b/chrome/browser/autocomplete/search_provider_unittest.cc @@ -566,7 +566,7 @@ TEST_F(SearchProviderTest, QueryKeywordProvider) { EXPECT_FALSE(match.keyword.empty()); // The fill into edit should contain the keyword. - EXPECT_EQ(keyword_t_url_->keyword() + char16(' ') + keyword_term_, + EXPECT_EQ(keyword_t_url_->keyword() + base::char16(' ') + keyword_term_, match.fill_into_edit); } diff --git a/chrome/browser/autocomplete/shortcuts_provider.h b/chrome/browser/autocomplete/shortcuts_provider.h index 471d0ff..e93fbd2 100644 --- a/chrome/browser/autocomplete/shortcuts_provider.h +++ b/chrome/browser/autocomplete/shortcuts_provider.h @@ -41,7 +41,7 @@ class ShortcutsProvider friend class ClassifyTest; friend class history::ShortcutsProviderTest; - typedef std::multimap<char16, base::string16> WordMap; + typedef std::multimap<base::char16, base::string16> WordMap; virtual ~ShortcutsProvider(); diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc index 926526e..3b02b70 100644 --- a/chrome/browser/bookmarks/bookmark_model.cc +++ b/chrome/browser/bookmarks/bookmark_model.cc @@ -44,7 +44,7 @@ BookmarkNode* AsMutable(const BookmarkNode* node) { } // Whitespace characters to strip from bookmark titles. -const char16 kInvalidChars[] = { +const base::char16 kInvalidChars[] = { '\n', '\r', '\t', 0x2028, // Line separator 0x2029, // Paragraph separator diff --git a/chrome/browser/component_updater/background_downloader_win.cc b/chrome/browser/component_updater/background_downloader_win.cc index cb02663..66a1796 100644 --- a/chrome/browser/component_updater/background_downloader_win.cc +++ b/chrome/browser/component_updater/background_downloader_win.cc @@ -96,7 +96,7 @@ namespace { // All jobs created by this module have a specific description so they can // be found at run-time or by using system administration tools. -const char16 kJobDescription[] = L"Chrome Component Updater"; +const base::char16 kJobDescription[] = L"Chrome Component Updater"; // How often the code looks for changes in the BITS job state. const int kJobPollingIntervalSec = 10; @@ -167,7 +167,7 @@ HRESULT GetJobFileProperties(IBackgroundCopyFile* file, HRESULT hr = S_OK; if (local_name) { - ScopedCoMem<char16> name; + ScopedCoMem<base::char16> name; hr = file->GetLocalName(&name); if (FAILED(hr)) return hr; @@ -175,7 +175,7 @@ HRESULT GetJobFileProperties(IBackgroundCopyFile* file, } if (remote_name) { - ScopedCoMem<char16> name; + ScopedCoMem<base::char16> name; hr = file->GetRemoteName(&name); if (FAILED(hr)) return hr; @@ -194,7 +194,7 @@ HRESULT GetJobFileProperties(IBackgroundCopyFile* file, } HRESULT GetJobDescription(IBackgroundCopyJob* job, const base::string16* name) { - ScopedCoMem<char16> description; + ScopedCoMem<base::char16> description; return job->GetDescription(&description); } @@ -288,7 +288,7 @@ bool JobFileUrlEqual::operator()(IBackgroundCopyJob* job, return false; for (size_t i = 0; i != files.size(); ++i) { - ScopedCoMem<char16> name; + ScopedCoMem<base::char16> name; if (SUCCEEDED(files[i]->GetRemoteName(&name)) && remote_name.compare(name) == 0) return true; diff --git a/chrome/browser/download/download_query_unittest.cc b/chrome/browser/download/download_query_unittest.cc index 974c0b0..2d8163c 100644 --- a/chrome/browser/download/download_query_unittest.cc +++ b/chrome/browser/download/download_query_unittest.cc @@ -123,7 +123,7 @@ template<> void DownloadQueryTest::AddFilter( } template<> void DownloadQueryTest::AddFilter( - DownloadQuery::FilterType name, const char16* cpp_value) { + DownloadQuery::FilterType name, const base::char16* cpp_value) { scoped_ptr<base::Value> value( base::Value::CreateStringValue(base::string16(cpp_value))); CHECK(query_.AddFilter(name, *value.get())); diff --git a/chrome/browser/drive/drive_api_util.cc b/chrome/browser/drive/drive_api_util.cc index 1034589..610f735 100644 --- a/chrome/browser/drive/drive_api_util.cc +++ b/chrome/browser/drive/drive_api_util.cc @@ -162,7 +162,8 @@ std::string TranslateQuery(const std::string& original_query) { // In order to handle non-ascii white spaces correctly, convert to UTF16. base::string16 query = base::UTF8ToUTF16(original_query); const base::string16 kDelimiter( - base::kWhitespaceUTF16 + base::string16(1, static_cast<char16>('"'))); + base::kWhitespaceUTF16 + + base::string16(1, static_cast<base::char16>('"'))); std::string result; for (size_t index = query.find_first_not_of(base::kWhitespaceUTF16); diff --git a/chrome/browser/extensions/extension_error_ui.cc b/chrome/browser/extensions/extension_error_ui.cc index 9dca279..fb2b0ff 100644 --- a/chrome/browser/extensions/extension_error_ui.cc +++ b/chrome/browser/extensions/extension_error_ui.cc @@ -48,7 +48,7 @@ base::string16 ExtensionErrorUI::GenerateMessageSection( extension_service_->GetInstalledExtension(*iter); message += l10n_util::GetStringFUTF16( e->is_app() ? app_template_message_id : extension_template_message_id, - base::UTF8ToUTF16(e->name())) + char16('\n'); + base::UTF8ToUTF16(e->name())) + base::char16('\n'); } return message; } diff --git a/chrome/browser/history/in_memory_url_index_types.h b/chrome/browser/history/in_memory_url_index_types.h index 976e062..91ef29f 100644 --- a/chrome/browser/history/in_memory_url_index_types.h +++ b/chrome/browser/history/in_memory_url_index_types.h @@ -81,8 +81,8 @@ TermMatches ReplaceOffsetsInTermMatches(const TermMatches& matches, typedef std::vector<base::string16> String16Vector; typedef std::set<base::string16> String16Set; -typedef std::set<char16> Char16Set; -typedef std::vector<char16> Char16Vector; +typedef std::set<base::char16> Char16Set; +typedef std::vector<base::char16> Char16Vector; // A vector that contains the offsets at which each word starts within a string. typedef std::vector<size_t> WordStarts; @@ -143,7 +143,7 @@ typedef std::map<base::string16, WordID> WordMap; // A map from character to the word_ids of words containing that character. typedef std::set<WordID> WordIDSet; // An index into the WordList. -typedef std::map<char16, WordIDSet> CharWordIDMap; +typedef std::map<base::char16, WordIDSet> CharWordIDMap; // A map from word (by word_id) to history items containing that word. typedef history::URLID HistoryID; diff --git a/chrome/browser/history/url_index_private_data.cc b/chrome/browser/history/url_index_private_data.cc index 1e11e2ef..1efaefe 100644 --- a/chrome/browser/history/url_index_private_data.cc +++ b/chrome/browser/history/url_index_private_data.cc @@ -804,7 +804,7 @@ void URLIndexPrivateData::AddWordHistory(const base::string16& term, Char16Set characters = Char16SetFromString16(term); for (Char16Set::iterator uni_char_iter = characters.begin(); uni_char_iter != characters.end(); ++uni_char_iter) { - char16 uni_char = *uni_char_iter; + base::char16 uni_char = *uni_char_iter; CharWordIDMap::iterator char_iter = char_word_map_.find(uni_char); if (char_iter != char_word_map_.end()) { // Update existing entry in the char/word index. @@ -868,7 +868,7 @@ void URLIndexPrivateData::RemoveRowWordsFromIndex(const URLRow& row) { Char16Set characters = Char16SetFromString16(word); for (Char16Set::iterator uni_char_iter = characters.begin(); uni_char_iter != characters.end(); ++uni_char_iter) { - char16 uni_char = *uni_char_iter; + base::char16 uni_char = *uni_char_iter; char_word_map_[uni_char].erase(word_id); if (char_word_map_[uni_char].empty()) char_word_map_.erase(uni_char); // No longer in use. @@ -1120,7 +1120,7 @@ bool URLIndexPrivateData::RestoreCharWordMap( actual_item_count = iter->word_id_size(); if (actual_item_count == 0 || actual_item_count != expected_item_count) return false; - char16 uni_char = static_cast<char16>(iter->char_16()); + base::char16 uni_char = static_cast<base::char16>(iter->char_16()); WordIDSet word_id_set; const RepeatedField<int32>& word_ids(iter->word_id()); for (RepeatedField<int32>::const_iterator jiter = word_ids.begin(); diff --git a/chrome/browser/importer/ie_importer_browsertest_win.cc b/chrome/browser/importer/ie_importer_browsertest_win.cc index a1a10b0..39f5e96 100644 --- a/chrome/browser/importer/ie_importer_browsertest_win.cc +++ b/chrome/browser/importer/ie_importer_browsertest_win.cc @@ -83,12 +83,12 @@ const BookmarkInfo kIESortedBookmarks[] = { {false, 0, {}, L"c", "http://www.google.com/3"}, }; -const char16 kIEIdentifyUrl[] = +const base::char16 kIEIdentifyUrl[] = L"http://A79029D6-753E-4e27-B807-3D46AB1545DF.com:8080/path?key=value"; -const char16 kIEIdentifyTitle[] = +const base::char16 kIEIdentifyTitle[] = L"Unittest GUID"; -const char16 kFaviconStreamSuffix[] = L"url:favicon:$DATA"; +const base::char16 kFaviconStreamSuffix[] = L"url:favicon:$DATA"; const char kDummyFaviconImageData[] = "\x42\x4D" // Magic signature 'BM' "\x1E\x00\x00\x00" // File size @@ -101,8 +101,8 @@ const char kDummyFaviconImageData[] = "\x00\xFF\x00\x00"; // The pixel struct FaviconGroup { - const char16* favicon_url; - const char16* site_url[2]; + const base::char16* favicon_url; + const base::char16* site_url[2]; }; const FaviconGroup kIEFaviconGroup[2] = { @@ -216,7 +216,7 @@ void ClearPStoreType(IPStore* pstore, const GUID* type, const GUID* subtype) { base::win::ScopedComPtr<IEnumPStoreItems, NULL> item; HRESULT result = pstore->EnumItems(0, type, subtype, 0, item.Receive()); if (result == PST_E_OK) { - char16* item_name; + base::char16* item_name; while (SUCCEEDED(item->Next(1, &item_name, 0))) { pstore->DeleteItem(0, type, subtype, item_name, NULL, 0); CoTaskMemFree(item_name); @@ -228,7 +228,7 @@ void ClearPStoreType(IPStore* pstore, const GUID* type, const GUID* subtype) { void WritePStore(IPStore* pstore, const GUID* type, const GUID* subtype) { struct PStoreItem { - char16* name; + base::char16* name; int data_size; char* data; } items[] = { @@ -501,7 +501,7 @@ IN_PROC_BROWSER_TEST_F(IEImporterBrowserTest, IEImporter) { file_util::WriteFile(path.AppendASCII("InvalidUrlFile.url"), "x", 1); file_util::WriteFile(path.AppendASCII("PlainTextFile.txt"), "x", 1); - const char16* root_links[] = { + const base::char16* root_links[] = { L"Links", L"Google Home Page.url", L"TheLink.url", diff --git a/chrome/browser/media_galleries/win/mtp_device_operations_util.cc b/chrome/browser/media_galleries/win/mtp_device_operations_util.cc index 8424183..178eb62 100644 --- a/chrome/browser/media_galleries/win/mtp_device_operations_util.cc +++ b/chrome/browser/media_galleries/win/mtp_device_operations_util.cc @@ -109,7 +109,7 @@ bool IsDirectory(IPortableDeviceValues* properties_values) { base::string16 GetObjectName(IPortableDeviceValues* properties_values, bool is_directory) { DCHECK(properties_values); - base::win::ScopedCoMem<char16> buffer; + base::win::ScopedCoMem<base::char16> buffer; REFPROPERTYKEY key = is_directory ? WPD_OBJECT_NAME : WPD_OBJECT_ORIGINAL_FILE_NAME; HRESULT hr = properties_values->GetStringValue(key, &buffer); @@ -269,7 +269,8 @@ bool GetMTPDeviceObjectEntries(IPortableDevice* device, const bool get_all_entries = object_name.empty(); for (HRESULT hr = S_OK; hr == S_OK;) { DWORD num_objects_fetched = 0; - scoped_ptr<char16*[]> object_ids(new char16*[num_objects_to_request]); + scoped_ptr<base::char16*[]> object_ids( + new base::char16*[num_objects_to_request]); hr = enum_object_ids->Next(num_objects_to_request, object_ids.get(), &num_objects_fetched); diff --git a/chrome/browser/profiles/profile_shortcut_manager_win.cc b/chrome/browser/profiles/profile_shortcut_manager_win.cc index 0dfc554..7b29dc1 100644 --- a/chrome/browser/profiles/profile_shortcut_manager_win.cc +++ b/chrome/browser/profiles/profile_shortcut_manager_win.cc @@ -55,9 +55,9 @@ const char kProfileIconFileName[] = "Google Profile.ico"; // Characters that are not allowed in Windows filenames. Taken from // http://msdn.microsoft.com/en-us/library/aa365247.aspx -const char16 kReservedCharacters[] = L"<>:\"/\\|?*\x01\x02\x03\x04\x05\x06\x07" - L"\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19" - L"\x1A\x1B\x1C\x1D\x1E\x1F"; +const base::char16 kReservedCharacters[] = L"<>:\"/\\|?*\x01\x02\x03\x04\x05" + L"\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17" + L"\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; // The maximum number of characters allowed in profile shortcuts' file names. // Warning: migration code will be needed if this is changed later, since diff --git a/chrome/browser/spellchecker/spellcheck_host_metrics.cc b/chrome/browser/spellchecker/spellcheck_host_metrics.cc index e2cb473..6e4f134 100644 --- a/chrome/browser/spellchecker/spellcheck_host_metrics.cc +++ b/chrome/browser/spellchecker/spellcheck_host_metrics.cc @@ -60,7 +60,7 @@ void SpellCheckHostMetrics::RecordCheckedWordStats(const base::string16& word, // Collects actual number of checked words, excluding duplication. base::MD5Digest digest; base::MD5Sum(reinterpret_cast<const unsigned char*>(word.c_str()), - word.size() * sizeof(char16), &digest); + word.size() * sizeof(base::char16), &digest); checked_word_hashes_.insert(base::MD5DigestToBase16(digest)); RecordWordCounts(); diff --git a/chrome/browser/storage_monitor/portable_device_watcher_win.cc b/chrome/browser/storage_monitor/portable_device_watcher_win.cc index bef912d..a206de9 100644 --- a/chrome/browser/storage_monitor/portable_device_watcher_win.cc +++ b/chrome/browser/storage_monitor/portable_device_watcher_win.cc @@ -28,7 +28,7 @@ namespace { // Name of the client application that communicates with the MTP device. -const char16 kClientName[] = L"Chromium"; +const base::char16 kClientName[] = L"Chromium"; // Name of the sequenced task runner. const char kMediaTaskRunnerName[] = "media-task-runner"; @@ -195,11 +195,11 @@ bool GetStringPropertyValue(IPortableDeviceValues* properties_values, base::string16* value) { DCHECK(properties_values); DCHECK(value); - base::win::ScopedCoMem<char16> buffer; + base::win::ScopedCoMem<base::char16> buffer; HRESULT hr = properties_values->GetStringValue(key, &buffer); if (FAILED(hr)) return false; - *value = static_cast<const char16*>(buffer); + *value = static_cast<const base::char16*>(buffer); return true; } @@ -413,7 +413,8 @@ bool EnumerateAttachedDevicesOnBlockingThread( if (FAILED(hr)) return false; - scoped_ptr<char16*[]> pnp_device_ids(new char16*[pnp_device_count]); + scoped_ptr<base::char16*[]> pnp_device_ids( + new base::char16*[pnp_device_count]); hr = portable_device_mgr->GetDevices(pnp_device_ids.get(), &pnp_device_count); if (FAILED(hr)) return false; diff --git a/chrome/browser/storage_monitor/removable_device_constants.cc b/chrome/browser/storage_monitor/removable_device_constants.cc index 0daddff..c8dacbe 100644 --- a/chrome/browser/storage_monitor/removable_device_constants.cc +++ b/chrome/browser/storage_monitor/removable_device_constants.cc @@ -12,7 +12,8 @@ const char kVendorModelVolumeStoragePrefix[] = "VendorModelVolumeStorage:"; #endif #if defined(OS_WIN) -const char16 kWPDDevInterfaceGUID[] = L"{6ac27878-a6fa-4155-ba85-f98f491d4f33}"; +const base::char16 kWPDDevInterfaceGUID[] = + L"{6ac27878-a6fa-4155-ba85-f98f491d4f33}"; #endif const base::FilePath::CharType kDCIMDirectoryName[] = FILE_PATH_LITERAL("DCIM"); diff --git a/chrome/browser/storage_monitor/removable_device_constants.h b/chrome/browser/storage_monitor/removable_device_constants.h index a7d9363..2b3ede8 100644 --- a/chrome/browser/storage_monitor/removable_device_constants.h +++ b/chrome/browser/storage_monitor/removable_device_constants.h @@ -19,7 +19,7 @@ extern const char kVendorModelVolumeStoragePrefix[]; #if defined(OS_WIN) // Windows portable device interface GUID constant. -extern const char16 kWPDDevInterfaceGUID[]; +extern const base::char16 kWPDDevInterfaceGUID[]; #endif extern const base::FilePath::CharType kDCIMDirectoryName[]; diff --git a/chrome/browser/storage_monitor/storage_monitor_mac.mm b/chrome/browser/storage_monitor/storage_monitor_mac.mm index 16ea943..a3439769d 100644 --- a/chrome/browser/storage_monitor/storage_monitor_mac.mm +++ b/chrome/browser/storage_monitor/storage_monitor_mac.mm @@ -32,7 +32,7 @@ base::string16 JoinName(const base::string16& name, return name; if (name.empty()) return addition; - return name + static_cast<char16>(' ') + addition; + return name + static_cast<base::char16>(' ') + addition; } StorageInfo::Type GetDeviceType(bool is_removable, bool has_dcim) { diff --git a/chrome/browser/storage_monitor/storage_monitor_win_unittest.cc b/chrome/browser/storage_monitor/storage_monitor_win_unittest.cc index 8798dc5..dc638bd 100644 --- a/chrome/browser/storage_monitor/storage_monitor_win_unittest.cc +++ b/chrome/browser/storage_monitor/storage_monitor_win_unittest.cc @@ -219,7 +219,7 @@ void StorageMonitorWinTest::DoMTPDeviceTest(const base::string16& pnp_device_id, if (FAILED(hr)) return; - size_t device_id_size = pnp_device_id.size() * sizeof(char16); + size_t device_id_size = pnp_device_id.size() * sizeof(base::char16); size_t size = sizeof(DEV_BROADCAST_DEVICEINTERFACE) + device_id_size; scoped_ptr_malloc<DEV_BROADCAST_DEVICEINTERFACE> dev_interface_broadcast( static_cast<DEV_BROADCAST_DEVICEINTERFACE*>(malloc(size))); diff --git a/chrome/browser/storage_monitor/test_portable_device_watcher_win.cc b/chrome/browser/storage_monitor/test_portable_device_watcher_win.cc index c35254d..5bb1976 100644 --- a/chrome/browser/storage_monitor/test_portable_device_watcher_win.cc +++ b/chrome/browser/storage_monitor/test_portable_device_watcher_win.cc @@ -13,11 +13,11 @@ namespace { // Sample MTP device storage information. -const char16 kMTPDeviceFriendlyName[] = L"Camera V1.1"; -const char16 kStorageLabelA[] = L"Camera V1.1 (s10001)"; -const char16 kStorageLabelB[] = L"Camera V1.1 (s20001)"; -const char16 kStorageObjectIdA[] = L"s10001"; -const char16 kStorageObjectIdB[] = L"s20001"; +const base::char16 kMTPDeviceFriendlyName[] = L"Camera V1.1"; +const base::char16 kStorageLabelA[] = L"Camera V1.1 (s10001)"; +const base::char16 kStorageLabelB[] = L"Camera V1.1 (s20001)"; +const base::char16 kStorageObjectIdA[] = L"s10001"; +const base::char16 kStorageObjectIdB[] = L"s20001"; const char kStorageUniqueIdB[] = "mtp:StorageSerial:SID-{s20001, S, 2238}:123123"; @@ -40,11 +40,12 @@ base::string16 GetMTPStorageName(const base::string16& pnp_device_id, // TestPortableDeviceWatcherWin ------------------------------------------------ // static -const char16 TestPortableDeviceWatcherWin::kMTPDeviceWithMultipleStorages[] = +const base::char16 +TestPortableDeviceWatcherWin::kMTPDeviceWithMultipleStorages[] = L"\\?\\usb#vid_ff&pid_18#32&2&1#{ab33-1de4-f22e-1882-9724})"; -const char16 TestPortableDeviceWatcherWin::kMTPDeviceWithInvalidInfo[] = +const base::char16 TestPortableDeviceWatcherWin::kMTPDeviceWithInvalidInfo[] = L"\\?\\usb#vid_00&pid_00#0&2&1#{0000-0000-0000-0000-0000})"; -const char16 TestPortableDeviceWatcherWin::kMTPDeviceWithValidInfo[] = +const base::char16 TestPortableDeviceWatcherWin::kMTPDeviceWithValidInfo[] = L"\\?\\usb#vid_ff&pid_000f#32&2&1#{abcd-1234-ffde-1112-9172})"; const char TestPortableDeviceWatcherWin::kStorageUniqueIdA[] = "mtp:StorageSerial:SID-{s10001, D, 12378}:123123"; diff --git a/chrome/browser/storage_monitor/test_portable_device_watcher_win.h b/chrome/browser/storage_monitor/test_portable_device_watcher_win.h index 61e544f..a81cb40 100644 --- a/chrome/browser/storage_monitor/test_portable_device_watcher_win.h +++ b/chrome/browser/storage_monitor/test_portable_device_watcher_win.h @@ -16,9 +16,9 @@ class TestPortableDeviceWatcherWin : public PortableDeviceWatcherWin { public: // MTP device PnP identifiers. - static const char16 kMTPDeviceWithMultipleStorages[]; - static const char16 kMTPDeviceWithInvalidInfo[]; - static const char16 kMTPDeviceWithValidInfo[]; + static const base::char16 kMTPDeviceWithMultipleStorages[]; + static const base::char16 kMTPDeviceWithInvalidInfo[]; + static const base::char16 kMTPDeviceWithValidInfo[]; // MTP device storage unique identifier. static const char kStorageUniqueIdA[]; diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index 8dc4040..352792c 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -371,7 +371,7 @@ void DevToolsInspectElementAt(RenderViewHost* rvh, int x, int y) { // Helper function to escape "&" as "&&". void EscapeAmpersands(base::string16* text) { - const char16 ampersand[] = {'&', 0}; + const base::char16 ampersand[] = {'&', 0}; base::ReplaceChars(*text, ampersand, base::ASCIIToUTF16("&&"), text); } diff --git a/chrome/browser/tab_contents/render_view_context_menu_unittest.cc b/chrome/browser/tab_contents/render_view_context_menu_unittest.cc index fe1357b..88e7bfe 100644 --- a/chrome/browser/tab_contents/render_view_context_menu_unittest.cc +++ b/chrome/browser/tab_contents/render_view_context_menu_unittest.cc @@ -40,7 +40,7 @@ static content::ContextMenuParams CreateParams(int contexts) { rv.media_type = blink::WebContextMenuData::MediaTypeNone; rv.page_url = GURL("http://test.page/"); - static const char16 selected_text[] = { 's', 'e', 'l', 0 }; + static const base::char16 selected_text[] = { 's', 'e', 'l', 0 }; if (contexts & MenuItem::SELECTION) rv.selection_text = selected_text; diff --git a/chrome/browser/ui/app_list/search/term_break_iterator.cc b/chrome/browser/ui/app_list/search/term_break_iterator.cc index 5c7d44d..5ace7dc 100644 --- a/chrome/browser/ui/app_list/search/term_break_iterator.cc +++ b/chrome/browser/ui/app_list/search/term_break_iterator.cc @@ -53,7 +53,7 @@ const base::string16 TermBreakIterator::GetCurrentTerm() const { return word_.substr(prev_, pos_ - prev_); } -TermBreakIterator::State TermBreakIterator::GetNewState(char16 ch) { +TermBreakIterator::State TermBreakIterator::GetNewState(base::char16 ch) { if (IsAsciiDigit(ch) || ch == '.' || ch == ',') return STATE_NUMBER; diff --git a/chrome/browser/ui/app_list/search/term_break_iterator.h b/chrome/browser/ui/app_list/search/term_break_iterator.h index 3a88cf9..6ff877e 100644 --- a/chrome/browser/ui/app_list/search/term_break_iterator.h +++ b/chrome/browser/ui/app_list/search/term_break_iterator.h @@ -52,7 +52,7 @@ class TermBreakIterator { }; // Returns new state for given |ch|. - State GetNewState(char16 ch); + State GetNewState(base::char16 ch); const base::string16& word_; size_t prev_; diff --git a/chrome/browser/ui/gtk/gtk_util.cc b/chrome/browser/ui/gtk/gtk_util.cc index ebebb46e..c267fa5 100644 --- a/chrome/browser/ui/gtk/gtk_util.cc +++ b/chrome/browser/ui/gtk/gtk_util.cc @@ -946,7 +946,7 @@ base::string16 GetStockPreferencesMenuLabel() { GtkStockItem stock_item; base::string16 preferences; if (gtk_stock_lookup(GTK_STOCK_PREFERENCES, &stock_item)) { - const char16 kUnderscore[] = { '_', 0 }; + const base::char16 kUnderscore[] = { '_', 0 }; base::RemoveChars(base::UTF8ToUTF16(stock_item.label), kUnderscore, &preferences); } diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc index 3241c50..0ddffb7 100644 --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc @@ -1282,7 +1282,7 @@ base::string16 OmniboxEditModel::DisplayTextFromUserText( base::string16 OmniboxEditModel::UserTextFromDisplayText( const base::string16& text) const { - return KeywordIsSelected() ? (keyword_ + char16(' ') + text) : text; + return KeywordIsSelected() ? (keyword_ + base::char16(' ') + text) : text; } void OmniboxEditModel::GetInfoForCurrentText(AutocompleteMatch* match, diff --git a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc index df41d7b..4128dd1 100644 --- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc +++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc @@ -782,7 +782,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_BasicTextOperations) { // Insert one character at the end. Make sure we won't insert // anything after the special ZWS mark used in gtk implementation. ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_A, 0)); - EXPECT_EQ(old_text + char16('a'), omnibox_view->GetText()); + EXPECT_EQ(old_text + base::char16('a'), omnibox_view->GetText()); // Delete one character from the end. Make sure we won't delete the special // ZWS mark used in gtk implementation. @@ -860,7 +860,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_AcceptKeywordBySpace) { // Keyword shouldn't be accepted by pressing space with a trailing // whitespace. - omnibox_view->SetWindowTextAndCaretPos(search_keyword + char16(' '), + omnibox_view->SetWindowTextAndCaretPos(search_keyword + base::char16(' '), search_keyword.length() + 1, false, false); ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_SPACE, 0)); ASSERT_TRUE(omnibox_view->model()->is_keyword_hint()); @@ -871,7 +871,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_AcceptKeywordBySpace) { ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, 0)); ASSERT_TRUE(omnibox_view->model()->is_keyword_hint()); ASSERT_EQ(search_keyword, omnibox_view->model()->keyword()); - ASSERT_EQ(search_keyword + char16(' '), omnibox_view->GetText()); + ASSERT_EQ(search_keyword + base::char16(' '), omnibox_view->GetText()); // Keyword shouldn't be accepted by pressing space before a trailing space. ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_LEFT, 0)); diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc index ee6ca0e..0658bb5 100644 --- a/chrome/browser/ui/views/download/download_item_view.cc +++ b/chrome/browser/ui/views/download/download_item_view.cc @@ -1243,11 +1243,11 @@ void DownloadItemView::SizeLabelToMinWidth() { // This can be a low surrogate codepoint, but u_isUWhiteSpace will // return false and inserting a new line after a surrogate pair // is perfectly ok. - char16 line_end_char = current_text[pos - 1]; + base::char16 line_end_char = current_text[pos - 1]; if (u_isUWhiteSpace(line_end_char)) - current_text.replace(pos - 1, 1, 1, char16('\n')); + current_text.replace(pos - 1, 1, 1, base::char16('\n')); else - current_text.insert(pos, 1, char16('\n')); + current_text.insert(pos, 1, base::char16('\n')); dangerous_download_label_->SetText(current_text); size = dangerous_download_label_->GetPreferredSize(); @@ -1286,7 +1286,7 @@ void DownloadItemView::UpdateAccessibleName() { if (IsShowingWarningDialog()) { new_name = dangerous_download_label_->text(); } else { - new_name = status_text_ + char16(' ') + + new_name = status_text_ + base::char16(' ') + download()->GetFileNameToReportUser().LossyDisplayName(); } diff --git a/chrome/browser/ui/views/extensions/extension_message_bubble_view.cc b/chrome/browser/ui/views/extensions/extension_message_bubble_view.cc index f8260b5..3e940a9 100644 --- a/chrome/browser/ui/views/extensions/extension_message_bubble_view.cc +++ b/chrome/browser/ui/views/extensions/extension_message_bubble_view.cc @@ -241,7 +241,7 @@ void ExtensionMessageBubbleView::Init() { extensions->SetHorizontalAlignment(gfx::ALIGN_LEFT); std::vector<base::string16> extension_list; - char16 bullet_point = 0x2022; + base::char16 bullet_point = 0x2022; std::vector<base::string16> suspicious = delegate_->GetExtensions(); size_t i = 0; diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc index 6a571a5..3d5defb 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc @@ -40,7 +40,7 @@ namespace { -const char16 kEllipsis[] = { 0x2026, 0x0 }; +const base::char16 kEllipsis[] = { 0x2026, 0x0 }; // The minimum distance between the top and bottom of the {icon|text} and the // top or bottom of the row. diff --git a/chrome/browser/usb/usb_device_handle.cc b/chrome/browser/usb/usb_device_handle.cc index 6d32be4..367ecfd 100644 --- a/chrome/browser/usb/usb_device_handle.cc +++ b/chrome/browser/usb/usb_device_handle.cc @@ -376,7 +376,7 @@ bool UsbDeviceHandle::GetSerial(base::string16* serial) { for (int i = 1; i <= language_count; ++i) { // Get the string using language ID. - char16 text[256] = { 0 }; + base::char16 text[256] = { 0 }; size = libusb_get_string_descriptor( handle_, desc.iSerialNumber, langid[i], reinterpret_cast<unsigned char*>(&text[0]), sizeof(text)); |