| Index: win8/metro_driver/file_picker.cc
|
| diff --git a/win8/metro_driver/file_picker.cc b/win8/metro_driver/file_picker.cc
|
| index cf1c878b1fde312eb1d326e250bf7833e5a9cb84..f824869f7c163dcf2bdb532cb315399cd46c7a83 100644
|
| --- a/win8/metro_driver/file_picker.cc
|
| +++ b/win8/metro_driver/file_picker.cc
|
| @@ -30,7 +30,7 @@ class StringVectorImpl : public mswr::RuntimeClass<StringVectorItf> {
|
| std::for_each(strings_.begin(), strings_.end(), ::WindowsDeleteString);
|
| }
|
|
|
| - HRESULT RuntimeClassInitialize(const std::vector<string16>& list) {
|
| + HRESULT RuntimeClassInitialize(const std::vector<base::string16>& list) {
|
| for (size_t i = 0; i < list.size(); ++i)
|
| strings_.push_back(MakeHString(list[i]));
|
|
|
| @@ -132,7 +132,7 @@ class OpenFilePickerSession : public FilePickerSessionBase {
|
| // Composes a multi-file result string suitable for returning to a
|
| // from a storage file collection.
|
| static HRESULT ComposeMultiFileResult(StorageFileVectorCollection* files,
|
| - string16* result);
|
| + base::string16* result);
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(OpenFilePickerSession);
|
| };
|
| @@ -243,7 +243,7 @@ HRESULT OpenFilePickerSession::MultiPickerDone(MultiFileAsyncOp* async,
|
| HRESULT hr = async->GetResults(files.GetAddressOf());
|
|
|
| if (files) {
|
| - string16 result;
|
| + base::string16 result;
|
| if (SUCCEEDED(hr))
|
| hr = ComposeMultiFileResult(files.Get(), &result);
|
|
|
| @@ -305,7 +305,7 @@ HRESULT OpenFilePickerSession::StartFilePicker() {
|
| break;
|
|
|
| // There can be a single extension, or a list of semicolon-separated ones.
|
| - std::vector<string16> extensions_win32_style;
|
| + std::vector<base::string16> extensions_win32_style;
|
| size_t extension_count = Tokenize(walk, L";", &extensions_win32_style);
|
| DCHECK_EQ(extension_count, extensions_win32_style.size());
|
|
|
| @@ -318,9 +318,10 @@ HRESULT OpenFilePickerSession::StartFilePicker() {
|
| hr = extension.Set(L"*");
|
| } else {
|
| // Metro wants suffixes only, not patterns.
|
| - string16 ext = base::FilePath(extensions_win32_style[i]).Extension();
|
| + base::string16 ext =
|
| + base::FilePath(extensions_win32_style[i]).Extension();
|
| if ((ext.size() < 2) ||
|
| - (ext.find_first_of(L"*?") != string16::npos)) {
|
| + (ext.find_first_of(L"*?") != base::string16::npos)) {
|
| continue;
|
| }
|
| hr = extension.Set(ext.c_str());
|
| @@ -371,7 +372,7 @@ HRESULT OpenFilePickerSession::StartFilePicker() {
|
| }
|
|
|
| HRESULT OpenFilePickerSession::ComposeMultiFileResult(
|
| - StorageFileVectorCollection* files, string16* result) {
|
| + StorageFileVectorCollection* files, base::string16* result) {
|
| DCHECK(files != NULL);
|
| DCHECK(result != NULL);
|
|
|
| @@ -475,17 +476,18 @@ HRESULT SaveFilePickerSession::StartFilePicker() {
|
| break;
|
|
|
| // There can be a single extension, or a list of semicolon-separated ones.
|
| - std::vector<string16> extensions_win32_style;
|
| + std::vector<base::string16> extensions_win32_style;
|
| size_t extension_count = Tokenize(walk, L";", &extensions_win32_style);
|
| DCHECK_EQ(extension_count, extensions_win32_style.size());
|
|
|
| // Metro wants suffixes only, not patterns. Also, metro does not support
|
| // the all files ("*") pattern in the save picker.
|
| - std::vector<string16> extensions;
|
| + std::vector<base::string16> extensions;
|
| for (size_t i = 0; i < extensions_win32_style.size(); ++i) {
|
| - string16 ext = base::FilePath(extensions_win32_style[i]).Extension();
|
| + base::string16 ext =
|
| + base::FilePath(extensions_win32_style[i]).Extension();
|
| if ((ext.size() < 2) ||
|
| - (ext.find_first_of(L"*?") != string16::npos))
|
| + (ext.find_first_of(L"*?") != base::string16::npos))
|
| continue;
|
| extensions.push_back(ext);
|
| }
|
| @@ -530,7 +532,7 @@ HRESULT SaveFilePickerSession::StartFilePicker() {
|
|
|
| mswr::ComPtr<StringVectorItf> list;
|
| hr = mswr::MakeAndInitialize<StringVectorImpl>(
|
| - list.GetAddressOf(), std::vector<string16>(1, L".dat"));
|
| + list.GetAddressOf(), std::vector<base::string16>(1, L".dat"));
|
| if (FAILED(hr))
|
| return hr;
|
|
|
| @@ -581,7 +583,7 @@ HRESULT SaveFilePickerSession::FilePickerDone(SaveFileAsyncOp* async,
|
| hr = storage_item->get_Path(file_path.GetAddressOf());
|
|
|
| if (SUCCEEDED(hr)) {
|
| - string16 path_str = MakeStdWString(file_path.Get());
|
| + base::string16 path_str = MakeStdWString(file_path.Get());
|
|
|
| // If the selected file name is longer than the supplied buffer,
|
| // we return false as per GetOpenFileName documentation.
|
|
|