Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Unified Diff: win8/metro_driver/file_picker.cc

Issue 11884021: size_t -> uint32 for building on win x64 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | win8/metro_driver/winrt_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win8/metro_driver/file_picker.cc
diff --git a/win8/metro_driver/file_picker.cc b/win8/metro_driver/file_picker.cc
index 4977be642e9ba3e0822bd94e8c03a5201f3ae29b..51a1d83f95027177d934d8054357ac84c9bcfb89 100644
--- a/win8/metro_driver/file_picker.cc
+++ b/win8/metro_driver/file_picker.cc
@@ -45,7 +45,9 @@ class StringVectorImpl : public mswr::RuntimeClass<StringVectorItf> {
return ::WindowsDuplicateString(strings_[index], item);
}
STDMETHOD(get_Size)(unsigned *size) {
- *size = strings_.size();
+ if (strings_.size() > UINT_MAX)
+ return E_INVALIDARG;
cpu_(ooo_6.6-7.5) 2013/01/14 22:21:20 return E_UNEXPECTED;
scottmg 2013/01/14 22:27:56 Done.
+ *size = static_cast<unsigned>(strings_.size());
return S_OK;
}
STDMETHOD(GetView)(winfoundtn::Collections::IVectorView<HSTRING> **view) {
@@ -209,7 +211,7 @@ HRESULT OpenFilePickerSession::SinglePickerDone(SingleFileAsyncOp* async,
hr = storage_item->get_Path(file_path.GetAddressOf());
if (SUCCEEDED(hr)) {
- size_t path_len = 0;
+ UINT32 path_len = 0;
const wchar_t* path_str =
::WindowsGetStringRawBuffer(file_path.Get(), &path_len);
@@ -377,7 +379,7 @@ HRESULT OpenFilePickerSession::ComposeMultiFileResult(
// Empty the output string.
result->clear();
- size_t num_files = 0;
+ unsigned int num_files = 0;
HRESULT hr = files->get_Size(&num_files);
if (FAILED(hr))
return hr;
@@ -392,7 +394,7 @@ HRESULT OpenFilePickerSession::ComposeMultiFileResult(
FilePath base_path;
// Iterate through the collection and append the file paths to the result.
- for (size_t i = 0; i < num_files; ++i) {
+ for (unsigned int i = 0; i < num_files; ++i) {
mswr::ComPtr<winstorage::IStorageFile> file;
hr = files->GetAt(i, file.GetAddressOf());
if (FAILED(hr))
« no previous file with comments | « no previous file | win8/metro_driver/winrt_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698