diff options
author | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-20 23:51:21 +0000 |
---|---|---|
committer | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-20 23:51:21 +0000 |
commit | 7d371726b47494dcc99dcf783a68062b29395aab (patch) | |
tree | 0cbb5524342000974b35bf7902ad06b3a8e92c11 /sandbox | |
parent | f8be8c6dfc418d239317958526e2cbea8254cabc (diff) | |
download | chromium_src-7d371726b47494dcc99dcf783a68062b29395aab.zip chromium_src-7d371726b47494dcc99dcf783a68062b29395aab.tar.gz chromium_src-7d371726b47494dcc99dcf783a68062b29395aab.tar.bz2 |
Add base:: to string16s in sandbox/.
R=rvargas@chromium.org, nsylvain@chromium.org
BUG=329295
Review URL: https://codereview.chromium.org/119713003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/win/src/app_container.cc | 21 | ||||
-rw-r--r-- | sandbox/win/src/app_container.h | 11 | ||||
-rw-r--r-- | sandbox/win/src/app_container_test.cc | 3 | ||||
-rw-r--r-- | sandbox/win/src/app_container_unittest.cc | 2 | ||||
-rw-r--r-- | sandbox/win/src/broker_services.cc | 6 | ||||
-rw-r--r-- | sandbox/win/src/handle_closer.cc | 2 | ||||
-rw-r--r-- | sandbox/win/src/handle_closer.h | 5 | ||||
-rw-r--r-- | sandbox/win/src/handle_closer_test.cc | 12 | ||||
-rw-r--r-- | sandbox/win/src/handle_table.cc | 6 | ||||
-rw-r--r-- | sandbox/win/src/handle_table.h | 10 | ||||
-rw-r--r-- | sandbox/win/src/process_policy_test.cc | 48 | ||||
-rw-r--r-- | sandbox/win/src/sandbox_policy_base.cc | 10 | ||||
-rw-r--r-- | sandbox/win/src/sandbox_policy_base.h | 6 |
13 files changed, 73 insertions, 69 deletions
diff --git a/sandbox/win/src/app_container.cc b/sandbox/win/src/app_container.cc index 826b561..f8d7541 100644 --- a/sandbox/win/src/app_container.cc +++ b/sandbox/win/src/app_container.cc @@ -16,7 +16,7 @@ namespace { // Converts the passed in sid string to a PSID that must be relased with // LocalFree. -PSID ConvertSid(const string16& sid) { +PSID ConvertSid(const base::string16& sid) { PSID local_sid; if (!ConvertStringSidToSid(sid.c_str(), &local_sid)) return NULL; @@ -49,8 +49,8 @@ AppContainerAttributes::~AppContainerAttributes() { } ResultCode AppContainerAttributes::SetAppContainer( - const string16& app_container_sid, - const std::vector<string16>& capabilities) { + const base::string16& app_container_sid, + const std::vector<base::string16>& capabilities) { DCHECK(!capabilities_.AppContainerSid); DCHECK(attributes_.empty()); capabilities_.AppContainerSid = ConvertSid(app_container_sid); @@ -94,7 +94,8 @@ bool AppContainerAttributes::HasAppContainer() const { return (capabilities_.AppContainerSid != NULL); } -ResultCode CreateAppContainer(const string16& sid, const string16& name) { +ResultCode CreateAppContainer(const base::string16& sid, + const base::string16& name) { PSID local_sid; if (!ConvertStringSidToSid(sid.c_str(), &local_sid)) return SBOX_ERROR_INVALID_APP_CONTAINER; @@ -121,7 +122,7 @@ ResultCode CreateAppContainer(const string16& sid, const string16& name) { return operation_result; } -ResultCode DeleteAppContainer(const string16& sid) { +ResultCode DeleteAppContainer(const base::string16& sid) { PSID local_sid; if (!ConvertStringSidToSid(sid.c_str(), &local_sid)) return SBOX_ERROR_INVALID_APP_CONTAINER; @@ -146,10 +147,10 @@ ResultCode DeleteAppContainer(const string16& sid) { return operation_result; } -string16 LookupAppContainer(const string16& sid) { +base::string16 LookupAppContainer(const base::string16& sid) { PSID local_sid; if (!ConvertStringSidToSid(sid.c_str(), &local_sid)) - return string16(); + return base::string16(); typedef HRESULT (WINAPI* AppContainerLookupMonikerPtr)(PSID sid, LPWSTR* moniker); @@ -166,14 +167,14 @@ string16 LookupAppContainer(const string16& sid) { } if (!AppContainerLookupMoniker || !AppContainerFreeMemory) - return string16(); + return base::string16(); wchar_t* buffer = NULL; HRESULT rv = AppContainerLookupMoniker(local_sid, &buffer); if (FAILED(rv)) - return string16(); + return base::string16(); - string16 name(buffer); + base::string16 name(buffer); if (!AppContainerFreeMemory(buffer)) NOTREACHED(); return name; diff --git a/sandbox/win/src/app_container.h b/sandbox/win/src/app_container.h index 34b43e95f..8125d70 100644 --- a/sandbox/win/src/app_container.h +++ b/sandbox/win/src/app_container.h @@ -29,8 +29,8 @@ class AppContainerAttributes { ~AppContainerAttributes(); // Sets the AppContainer and capabilities to be used with the new process. - ResultCode SetAppContainer(const string16& app_container_sid, - const std::vector<string16>& capabilities); + ResultCode SetAppContainer(const base::string16& app_container_sid, + const std::vector<base::string16>& capabilities); // Updates the proc_thred attribute list of the provided startup_information // with the app container related data. @@ -53,15 +53,16 @@ class AppContainerAttributes { // AppContainer, and |name| will be used as both the display name and moniker. // This function fails if the OS doesn't support AppContainers, or if there is // an AppContainer registered with the same id. -ResultCode CreateAppContainer(const string16& sid, const string16& name); +ResultCode CreateAppContainer(const base::string16& sid, + const base::string16& name); // Deletes an AppContainer previously created with a successfull call to // CreateAppContainer. -ResultCode DeleteAppContainer(const string16& sid); +ResultCode DeleteAppContainer(const base::string16& sid); // Retrieves the name associated with the provided AppContainer sid. Returns an // empty string if the AppContainer is not registered with the system. -string16 LookupAppContainer(const string16& sid); +base::string16 LookupAppContainer(const base::string16& sid); } // namespace sandbox diff --git a/sandbox/win/src/app_container_test.cc b/sandbox/win/src/app_container_test.cc index 3b33ca5..1bfab2c 100644 --- a/sandbox/win/src/app_container_test.cc +++ b/sandbox/win/src/app_container_test.cc @@ -23,7 +23,8 @@ const wchar_t kAppContainerSid[] = const ULONG kSharing = FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE; -HANDLE CreateTaggedEvent(const string16& name, const string16& sid) { +HANDLE CreateTaggedEvent(const base::string16& name, + const base::string16& sid) { base::win::ScopedHandle event(CreateEvent(NULL, FALSE, FALSE, name.c_str())); if (!event.IsValid()) return NULL; diff --git a/sandbox/win/src/app_container_unittest.cc b/sandbox/win/src/app_container_unittest.cc index 936a9cb..4bce16a 100644 --- a/sandbox/win/src/app_container_unittest.cc +++ b/sandbox/win/src/app_container_unittest.cc @@ -37,7 +37,7 @@ TEST(AppContainerTest, SecurityCapabilities) { return; scoped_ptr<AppContainerAttributes> attributes(new AppContainerAttributes); - std::vector<string16> capabilities; + std::vector<base::string16> capabilities; EXPECT_EQ(SBOX_ERROR_INVALID_APP_CONTAINER, attributes->SetAppContainer(L"S-1-foo", capabilities)); diff --git a/sandbox/win/src/broker_services.cc b/sandbox/win/src/broker_services.cc index 921eb4f..54d87c4 100644 --- a/sandbox/win/src/broker_services.cc +++ b/sandbox/win/src/broker_services.cc @@ -316,7 +316,7 @@ ResultCode BrokerServicesBase::SpawnTarget(const wchar_t* exe_path, // Initialize the startup information from the policy. base::win::StartupInformation startup_info; - string16 desktop = policy_base->GetAlternateDesktop(); + base::string16 desktop = policy_base->GetAlternateDesktop(); if (!desktop.empty()) { startup_info.startup_info()->lpDesktop = const_cast<wchar_t*>(desktop.c_str()); @@ -486,7 +486,7 @@ ResultCode BrokerServicesBase::InstallAppContainer(const wchar_t* sid, if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8) return SBOX_ERROR_UNSUPPORTED; - string16 old_name = LookupAppContainer(sid); + base::string16 old_name = LookupAppContainer(sid); if (old_name.empty()) return CreateAppContainer(sid, name); @@ -500,7 +500,7 @@ ResultCode BrokerServicesBase::UninstallAppContainer(const wchar_t* sid) { if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8) return SBOX_ERROR_UNSUPPORTED; - string16 name = LookupAppContainer(sid); + base::string16 name = LookupAppContainer(sid); if (name.empty()) return SBOX_ERROR_INVALID_APP_CONTAINER; diff --git a/sandbox/win/src/handle_closer.cc b/sandbox/win/src/handle_closer.cc index 39915a9..8ab9209 100644 --- a/sandbox/win/src/handle_closer.cc +++ b/sandbox/win/src/handle_closer.cc @@ -174,7 +174,7 @@ bool HandleCloser::SetupHandleInterceptions(InterceptionManager* manager) { return true; } -bool GetHandleName(HANDLE handle, string16* handle_name) { +bool GetHandleName(HANDLE handle, base::string16* handle_name) { static NtQueryObject QueryObject = NULL; if (!QueryObject) ResolveNTFunctionPtr("NtQueryObject", &QueryObject); diff --git a/sandbox/win/src/handle_closer.h b/sandbox/win/src/handle_closer.h index a6f81d5..8833b84 100644 --- a/sandbox/win/src/handle_closer.h +++ b/sandbox/win/src/handle_closer.h @@ -19,7 +19,8 @@ namespace sandbox { // This is a map of handle-types to names that we need to close in the // target process. A null set means we need to close all handles of the // given type. -typedef std::map<const string16, std::set<const string16> > HandleMap; +typedef std::map<const base::string16, std::set<const base::string16> > + HandleMap; // Type and set of corresponding handle names to close. struct HandleListEntry { @@ -68,7 +69,7 @@ class HandleCloser { }; // Returns the object manager's name associated with a handle -bool GetHandleName(HANDLE handle, string16* handle_name); +bool GetHandleName(HANDLE handle, base::string16* handle_name); } // namespace sandbox diff --git a/sandbox/win/src/handle_closer_test.cc b/sandbox/win/src/handle_closer_test.cc index ba0e33a..9adcf6c 100644 --- a/sandbox/win/src/handle_closer_test.cc +++ b/sandbox/win/src/handle_closer_test.cc @@ -19,7 +19,7 @@ const wchar_t *kFileExtensions[] = { L".1", L".2", L".3", L".4" }; HANDLE GetMarkerFile(const wchar_t *extension) { wchar_t path_buffer[MAX_PATH + 1]; CHECK(::GetTempPath(MAX_PATH, path_buffer)); - string16 marker_path = path_buffer; + base::string16 marker_path = path_buffer; marker_path += L"\\sbox_marker_"; // Generate a unique value from the exe's size and timestamp. @@ -76,7 +76,7 @@ SBOX_TESTS_COMMAND int CheckForFileHandles(int argc, wchar_t **argv) { const size_t kHandleOffset = sizeof(HANDLE); HANDLE handle = NULL; int invalid_count = 0; - string16 handle_name; + base::string16 handle_name; if (!::GetProcessHandleCount(::GetCurrentProcess(), &handle_count)) return SBOX_TEST_FAILED_TO_RUN_TEST; @@ -110,9 +110,9 @@ TEST(HandleCloserTest, CheckForMarkerFiles) { runner.SetTestState(EVERY_STATE); sandbox::TargetPolicy* policy = runner.GetPolicy(); - string16 command = string16(L"CheckForFileHandles Y"); + base::string16 command = base::string16(L"CheckForFileHandles Y"); for (int i = 0; i < arraysize(kFileExtensions); ++i) { - string16 handle_name; + base::string16 handle_name; base::win::ScopedHandle marker(GetMarkerFile(kFileExtensions[i])); CHECK(marker.IsValid()); CHECK(sandbox::GetHandleName(marker, &handle_name)); @@ -130,9 +130,9 @@ TEST(HandleCloserTest, CloseMarkerFiles) { runner.SetTestState(EVERY_STATE); sandbox::TargetPolicy* policy = runner.GetPolicy(); - string16 command = string16(L"CheckForFileHandles N"); + base::string16 command = base::string16(L"CheckForFileHandles N"); for (int i = 0; i < arraysize(kFileExtensions); ++i) { - string16 handle_name; + base::string16 handle_name; base::win::ScopedHandle marker(GetMarkerFile(kFileExtensions[i])); CHECK(marker.IsValid()); CHECK(sandbox::GetHandleName(marker, &handle_name)); diff --git a/sandbox/win/src/handle_table.cc b/sandbox/win/src/handle_table.cc index 7230dff..deecfac 100644 --- a/sandbox/win/src/handle_table.cc +++ b/sandbox/win/src/handle_table.cc @@ -151,17 +151,17 @@ const OBJECT_TYPE_INFORMATION* HandleTable::HandleEntry::TypeInfo() { return type_info_buffer_.empty() ? NULL : type_info_internal(); } -const string16& HandleTable::HandleEntry::Name() { +const base::string16& HandleTable::HandleEntry::Name() { UpdateInfo(UPDATE_INFO_AND_NAME); return handle_name_; } -const string16& HandleTable::HandleEntry::Type() { +const base::string16& HandleTable::HandleEntry::Type() { UpdateInfo(UPDATE_INFO_AND_TYPE_NAME); return type_name_; } -bool HandleTable::HandleEntry::IsType(const string16& type_string) { +bool HandleTable::HandleEntry::IsType(const base::string16& type_string) { UpdateInfo(UPDATE_INFO_ONLY); if (type_info_buffer_.empty()) return false; diff --git a/sandbox/win/src/handle_table.h b/sandbox/win/src/handle_table.h index 21ff80f..e36bdb4 100644 --- a/sandbox/win/src/handle_table.h +++ b/sandbox/win/src/handle_table.h @@ -54,11 +54,11 @@ class HandleTable { const OBJECT_TYPE_INFORMATION* TypeInfo(); - const string16& Name(); + const base::string16& Name(); - const string16& Type(); + const base::string16& Type(); - bool IsType(const string16& type_string); + bool IsType(const base::string16& type_string); private: friend class Iterator; @@ -84,8 +84,8 @@ class HandleTable { const SYSTEM_HANDLE_INFORMATION* handle_entry_; const SYSTEM_HANDLE_INFORMATION* last_entry_; std::vector<BYTE> type_info_buffer_; - string16 handle_name_; - string16 type_name_; + base::string16 handle_name_; + base::string16 type_name_; DISALLOW_COPY_AND_ASSIGN(HandleEntry); }; diff --git a/sandbox/win/src/process_policy_test.cc b/sandbox/win/src/process_policy_test.cc index a03e0be..af64f14 100644 --- a/sandbox/win/src/process_policy_test.cc +++ b/sandbox/win/src/process_policy_test.cc @@ -21,10 +21,10 @@ namespace { // While the shell API provides better calls than this home brew function // we use GetSystemWindowsDirectoryW which does not query the registry so // it is safe to use after revert. -string16 MakeFullPathToSystem32(const wchar_t* name) { +base::string16 MakeFullPathToSystem32(const wchar_t* name) { wchar_t windows_path[MAX_PATH] = {0}; ::GetSystemWindowsDirectoryW(windows_path, MAX_PATH); - string16 full_path(windows_path); + base::string16 full_path(windows_path); if (full_path.empty()) { return full_path; } @@ -35,8 +35,8 @@ string16 MakeFullPathToSystem32(const wchar_t* name) { // Creates a process with the |exe| and |command| parameter using the // unicode and ascii version of the api. -sandbox::SboxTestResult CreateProcessHelper(const string16& exe, - const string16& command) { +sandbox::SboxTestResult CreateProcessHelper(const base::string16& exe, + const base::string16& command) { base::win::ScopedProcessInformation pi; STARTUPINFOW si = {sizeof(si)}; @@ -109,10 +109,10 @@ SBOX_TESTS_COMMAND int Process_RunApp1(int argc, wchar_t **argv) { if ((NULL == argv) || (NULL == argv[0])) { return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; } - string16 path = MakeFullPathToSystem32(argv[0]); + base::string16 path = MakeFullPathToSystem32(argv[0]); // TEST 1: Try with the path in the app_name. - return CreateProcessHelper(path, string16()); + return CreateProcessHelper(path, base::string16()); } SBOX_TESTS_COMMAND int Process_RunApp2(int argc, wchar_t **argv) { @@ -122,13 +122,13 @@ SBOX_TESTS_COMMAND int Process_RunApp2(int argc, wchar_t **argv) { if ((NULL == argv) || (NULL == argv[0])) { return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; } - string16 path = MakeFullPathToSystem32(argv[0]); + base::string16 path = MakeFullPathToSystem32(argv[0]); // TEST 2: Try with the path in the cmd_line. - string16 cmd_line = L"\""; + base::string16 cmd_line = L"\""; cmd_line += path; cmd_line += L"\""; - return CreateProcessHelper(string16(), cmd_line); + return CreateProcessHelper(base::string16(), cmd_line); } SBOX_TESTS_COMMAND int Process_RunApp3(int argc, wchar_t **argv) { @@ -140,7 +140,7 @@ SBOX_TESTS_COMMAND int Process_RunApp3(int argc, wchar_t **argv) { } // TEST 3: Try file name in the cmd_line. - return CreateProcessHelper(string16(), argv[0]); + return CreateProcessHelper(base::string16(), argv[0]); } SBOX_TESTS_COMMAND int Process_RunApp4(int argc, wchar_t **argv) { @@ -152,7 +152,7 @@ SBOX_TESTS_COMMAND int Process_RunApp4(int argc, wchar_t **argv) { } // TEST 4: Try file name in the app_name and current directory sets correctly. - string16 system32 = MakeFullPathToSystem32(L""); + base::string16 system32 = MakeFullPathToSystem32(L""); wchar_t current_directory[MAX_PATH + 1]; int result4; bool test_succeeded = false; @@ -164,7 +164,7 @@ SBOX_TESTS_COMMAND int Process_RunApp4(int argc, wchar_t **argv) { current_directory[ret] = L'\\'; current_directory[ret+1] = L'\0'; if (::SetCurrentDirectory(system32.c_str())) { - result4 = CreateProcessHelper(argv[0], string16()); + result4 = CreateProcessHelper(argv[0], base::string16()); if (::SetCurrentDirectory(current_directory)) { test_succeeded = true; } @@ -185,13 +185,13 @@ SBOX_TESTS_COMMAND int Process_RunApp5(int argc, wchar_t **argv) { if ((NULL == argv) || (NULL == argv[0])) { return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; } - string16 path = MakeFullPathToSystem32(argv[0]); + base::string16 path = MakeFullPathToSystem32(argv[0]); // TEST 5: Try with the path in the cmd_line and arguments. - string16 cmd_line = L"\""; + base::string16 cmd_line = L"\""; cmd_line += path; cmd_line += L"\" /I"; - return CreateProcessHelper(string16(), cmd_line); + return CreateProcessHelper(base::string16(), cmd_line); } SBOX_TESTS_COMMAND int Process_RunApp6(int argc, wchar_t **argv) { @@ -203,9 +203,9 @@ SBOX_TESTS_COMMAND int Process_RunApp6(int argc, wchar_t **argv) { } // TEST 6: Try with the file_name in the cmd_line and arguments. - string16 cmd_line = argv[0]; + base::string16 cmd_line = argv[0]; cmd_line += L" /I"; - return CreateProcessHelper(string16(), cmd_line); + return CreateProcessHelper(base::string16(), cmd_line); } // Creates a process and checks if it's possible to get a handle to it's token. @@ -216,7 +216,7 @@ SBOX_TESTS_COMMAND int Process_GetChildProcessToken(int argc, wchar_t **argv) { if ((NULL == argv) || (NULL == argv[0])) return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; - string16 path = MakeFullPathToSystem32(argv[0]); + base::string16 path = MakeFullPathToSystem32(argv[0]); STARTUPINFOW si = {sizeof(si)}; @@ -284,8 +284,8 @@ TEST(ProcessPolicyTest, TestAllAccess) { TEST(ProcessPolicyTest, CreateProcessAW) { TestRunner runner; - string16 exe_path = MakeFullPathToSystem32(L"findstr.exe"); - string16 system32 = MakeFullPathToSystem32(L""); + base::string16 exe_path = MakeFullPathToSystem32(L"findstr.exe"); + base::string16 system32 = MakeFullPathToSystem32(L""); ASSERT_TRUE(!exe_path.empty()); EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_PROCESS, TargetPolicy::PROCESS_MIN_EXEC, @@ -339,7 +339,7 @@ TEST(ProcessPolicyTest, OpenToken) { TEST(ProcessPolicyTest, TestGetProcessTokenMinAccess) { TestRunner runner; - string16 exe_path = MakeFullPathToSystem32(L"findstr.exe"); + base::string16 exe_path = MakeFullPathToSystem32(L"findstr.exe"); ASSERT_TRUE(!exe_path.empty()); EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_PROCESS, TargetPolicy::PROCESS_MIN_EXEC, @@ -351,7 +351,7 @@ TEST(ProcessPolicyTest, TestGetProcessTokenMinAccess) { TEST(ProcessPolicyTest, TestGetProcessTokenMaxAccess) { TestRunner runner(JOB_UNPROTECTED, USER_INTERACTIVE, USER_INTERACTIVE); - string16 exe_path = MakeFullPathToSystem32(L"findstr.exe"); + base::string16 exe_path = MakeFullPathToSystem32(L"findstr.exe"); ASSERT_TRUE(!exe_path.empty()); EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_PROCESS, TargetPolicy::PROCESS_ALL_EXEC, @@ -363,7 +363,7 @@ TEST(ProcessPolicyTest, TestGetProcessTokenMaxAccess) { TEST(ProcessPolicyTest, TestGetProcessTokenMinAccessNoJob) { TestRunner runner(JOB_NONE, USER_RESTRICTED_SAME_ACCESS, USER_LOCKDOWN); - string16 exe_path = MakeFullPathToSystem32(L"findstr.exe"); + base::string16 exe_path = MakeFullPathToSystem32(L"findstr.exe"); ASSERT_TRUE(!exe_path.empty()); EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_PROCESS, TargetPolicy::PROCESS_MIN_EXEC, @@ -375,7 +375,7 @@ TEST(ProcessPolicyTest, TestGetProcessTokenMinAccessNoJob) { TEST(ProcessPolicyTest, TestGetProcessTokenMaxAccessNoJob) { TestRunner runner(JOB_NONE, USER_INTERACTIVE, USER_INTERACTIVE); - string16 exe_path = MakeFullPathToSystem32(L"findstr.exe"); + base::string16 exe_path = MakeFullPathToSystem32(L"findstr.exe"); ASSERT_TRUE(!exe_path.empty()); EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_PROCESS, TargetPolicy::PROCESS_ALL_EXEC, diff --git a/sandbox/win/src/sandbox_policy_base.cc b/sandbox/win/src/sandbox_policy_base.cc index 220a070..42006e6 100644 --- a/sandbox/win/src/sandbox_policy_base.cc +++ b/sandbox/win/src/sandbox_policy_base.cc @@ -173,21 +173,21 @@ ResultCode PolicyBase::SetAlternateDesktop(bool alternate_winstation) { return CreateAlternateDesktop(alternate_winstation); } -string16 PolicyBase::GetAlternateDesktop() const { +base::string16 PolicyBase::GetAlternateDesktop() const { // No alternate desktop or winstation. Return an empty string. if (!use_alternate_desktop_ && !use_alternate_winstation_) { - return string16(); + return base::string16(); } // The desktop and winstation should have been created by now. // If we hit this scenario, it means that the user ignored the failure // during SetAlternateDesktop, so we ignore it here too. if (use_alternate_desktop_ && !alternate_desktop_handle_) { - return string16(); + return base::string16(); } if (use_alternate_winstation_ && (!alternate_desktop_handle_ || !alternate_winstation_handle_)) { - return string16(); + return base::string16(); } return GetFullDesktopName(alternate_winstation_handle_, @@ -649,7 +649,7 @@ bool PolicyBase::SetupAllInterceptions(TargetProcess* target) { } if (!blacklisted_dlls_.empty()) { - std::vector<string16>::iterator it = blacklisted_dlls_.begin(); + std::vector<base::string16>::iterator it = blacklisted_dlls_.begin(); for (; it != blacklisted_dlls_.end(); ++it) { manager.AddToUnloadModules(it->c_str()); } diff --git a/sandbox/win/src/sandbox_policy_base.h b/sandbox/win/src/sandbox_policy_base.h index d56501d..7969506 100644 --- a/sandbox/win/src/sandbox_policy_base.h +++ b/sandbox/win/src/sandbox_policy_base.h @@ -44,7 +44,7 @@ class PolicyBase : public Dispatcher, public TargetPolicy { virtual ResultCode SetJobLevel(JobLevel job_level, uint32 ui_exceptions) OVERRIDE; virtual ResultCode SetAlternateDesktop(bool alternate_winstation) OVERRIDE; - virtual string16 GetAlternateDesktop() const OVERRIDE; + virtual base::string16 GetAlternateDesktop() const OVERRIDE; virtual ResultCode CreateAlternateDesktop(bool alternate_winstation) OVERRIDE; virtual void DestroyAlternateDesktop() OVERRIDE; virtual ResultCode SetIntegrityLevel(IntegrityLevel integrity_level) OVERRIDE; @@ -141,12 +141,12 @@ class PolicyBase : public Dispatcher, public TargetPolicy { // Memory structure that stores the low level policy. PolicyGlobal* policy_; // The list of dlls to unload in the target process. - std::vector<string16> blacklisted_dlls_; + std::vector<base::string16> blacklisted_dlls_; // This is a map of handle-types to names that we need to close in the // target process. A null set means we need to close all handles of the // given type. HandleCloser handle_closer_; - std::vector<string16> capabilities_; + std::vector<base::string16> capabilities_; scoped_ptr<AppContainerAttributes> appcontainer_list_; static HDESK alternate_desktop_handle_; |