diff options
author | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-20 19:22:23 +0000 |
---|---|---|
committer | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-20 19:22:23 +0000 |
commit | 517bc38ba676aa7698df7dae0b173f49b9d15bf8 (patch) | |
tree | 4baa618c7072e2a855ffce246a64a0326c7198b1 /chrome_elf | |
parent | 8f1ad25657141e93759dc7ab71b3630f50cafa88 (diff) | |
download | chromium_src-517bc38ba676aa7698df7dae0b173f49b9d15bf8.zip chromium_src-517bc38ba676aa7698df7dae0b173f49b9d15bf8.tar.gz chromium_src-517bc38ba676aa7698df7dae0b173f49b9d15bf8.tar.bz2 |
Add base:: to string16s in chrome_elf/.
R=caitkp@chromium.org
BUG=329295
Review URL: https://codereview.chromium.org/119433004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_elf')
-rw-r--r-- | chrome_elf/blacklist/blacklist_interceptions.cc | 24 | ||||
-rw-r--r-- | chrome_elf/blacklist/test/blacklist_test.cc | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/chrome_elf/blacklist/blacklist_interceptions.cc b/chrome_elf/blacklist/blacklist_interceptions.cc index 4de0bd2..f1e5b30 100644 --- a/chrome_elf/blacklist/blacklist_interceptions.cc +++ b/chrome_elf/blacklist/blacklist_interceptions.cc @@ -34,7 +34,7 @@ FARPROC GetNtDllExportByName(const char* export_name) { return ::GetProcAddress(ntdll, export_name); } -bool DllMatch(const string16& module_name) { +bool DllMatch(const base::string16& module_name) { for (int i = 0; i < blacklist::g_troublesome_dlls_cur_index; ++i) { if (module_name == blacklist::g_troublesome_dlls[i]) return true; @@ -46,7 +46,7 @@ bool DllMatch(const string16& module_name) { // code in sandbox_nt_util.cc. See if they can be unified. // Native reimplementation of PSAPIs GetMappedFileName. -string16 GetBackingModuleFilePath(PVOID address) { +base::string16 GetBackingModuleFilePath(PVOID address) { DCHECK_NT(g_nt_query_virtual_memory_func); // We'll start with something close to max_path characters for the name. @@ -77,11 +77,11 @@ string16 GetBackingModuleFilePath(PVOID address) { UNICODE_STRING* section_string = reinterpret_cast<UNICODE_STRING*>(section_name); - return string16(section_string->Buffer, - section_string->Length / sizeof(wchar_t)); + return base::string16(section_string->Buffer, + section_string->Length / sizeof(wchar_t)); } - return string16(); + return base::string16(); } bool IsModuleValidImageSection(HANDLE section, @@ -108,12 +108,12 @@ bool IsModuleValidImageSection(HANDLE section, return true; } -string16 ExtractLoadedModuleName(const string16& module_path) { +base::string16 ExtractLoadedModuleName(const base::string16& module_path) { if (module_path.empty() || module_path[module_path.size() - 1] == L'\\') - return string16(); + return base::string16(); size_t sep = module_path.find_last_of(L'\\'); - if (sep == string16::npos) + if (sep == base::string16::npos) return module_path; else return module_path.substr(sep+1); @@ -154,11 +154,11 @@ void SafeGetImageInfo(const base::win::PEImage& pe, } } -string16 GetImageInfoFromLoadedModule(HMODULE module, uint32* flags) { +base::string16 GetImageInfoFromLoadedModule(HMODULE module, uint32* flags) { std::string out_name; base::win::PEImage pe(module); SafeGetImageInfo(pe, &out_name, flags); - return string16(out_name.begin(), out_name.end()); + return base::string16(out_name.begin(), out_name.end()); } } // namespace @@ -204,9 +204,9 @@ SANDBOX_INTERCEPT NTSTATUS WINAPI BlNtMapViewOfSection( if (module) { UINT image_flags; - string16 module_name(GetImageInfoFromLoadedModule( + base::string16 module_name(GetImageInfoFromLoadedModule( reinterpret_cast<HMODULE>(*base), &image_flags)); - string16 file_name(GetBackingModuleFilePath(*base)); + base::string16 file_name(GetBackingModuleFilePath(*base)); if (module_name.empty() && (image_flags & sandbox::MODULE_HAS_CODE)) { // If the module has no exports we retrieve the module name from the diff --git a/chrome_elf/blacklist/test/blacklist_test.cc b/chrome_elf/blacklist/test/blacklist_test.cc index 6556e25..dbb662f 100644 --- a/chrome_elf/blacklist/test/blacklist_test.cc +++ b/chrome_elf/blacklist/test/blacklist_test.cc @@ -72,7 +72,7 @@ TEST_F(BlacklistTest, AddAndRemoveModules) { EXPECT_TRUE(blacklist::RemoveDllFromBlacklist(L"foo.dll")); EXPECT_FALSE(blacklist::RemoveDllFromBlacklist(L"foo.dll")); - std::vector<string16> added_dlls; + std::vector<base::string16> added_dlls; added_dlls.reserve(blacklist::kTroublesomeDllsMaxCount); for (int i = 0; i < blacklist::kTroublesomeDllsMaxCount; ++i) { added_dlls.push_back(base::IntToString16(i) + L".dll"); |