OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 #include <stddef.h> |
| 6 #include <stdint.h> |
| 7 |
5 #include "stdafx.h" | 8 #include "stdafx.h" |
6 #include "win8/metro_driver/file_picker_ash.h" | 9 #include "win8/metro_driver/file_picker_ash.h" |
7 | 10 |
8 #include "base/bind.h" | 11 #include "base/bind.h" |
9 #include "base/logging.h" | 12 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
11 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
12 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
13 #include "base/synchronization/waitable_event.h" | 16 #include "base/synchronization/waitable_event.h" |
14 #include "base/win/metro.h" | 17 #include "base/win/metro.h" |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 DCHECK_EQ(FALSE, replaced); | 455 DCHECK_EQ(FALSE, replaced); |
453 } | 456 } |
454 | 457 |
455 // Walk past the extension(s). | 458 // Walk past the extension(s). |
456 walk += wcslen(walk) + 1; | 459 walk += wcslen(walk) + 1; |
457 } | 460 } |
458 } | 461 } |
459 | 462 |
460 // The save picker requires at least one choice. Callers are strongly advised | 463 // The save picker requires at least one choice. Callers are strongly advised |
461 // to provide sensible choices. If none were given, fallback to .dat. | 464 // to provide sensible choices. If none were given, fallback to .dat. |
462 uint32 num_choices = 0; | 465 uint32_t num_choices = 0; |
463 hr = choices->get_Size(&num_choices); | 466 hr = choices->get_Size(&num_choices); |
464 if (FAILED(hr)) | 467 if (FAILED(hr)) |
465 return hr; | 468 return hr; |
466 | 469 |
467 if (num_choices == 0) { | 470 if (num_choices == 0) { |
468 mswrw::HString description; | 471 mswrw::HString description; |
469 // TODO(grt): Get a properly translated string. This can't be done from | 472 // TODO(grt): Get a properly translated string. This can't be done from |
470 // within metro_driver. Consider preprocessing the filter list in Chrome | 473 // within metro_driver. Consider preprocessing the filter list in Chrome |
471 // land to ensure it has this entry if all others are patterns. In that | 474 // land to ensure it has this entry if all others are patterns. In that |
472 // case, this whole block of code can be removed. | 475 // case, this whole block of code can be removed. |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 } else { | 611 } else { |
609 LOG(ERROR) << "NULL IStorageItem"; | 612 LOG(ERROR) << "NULL IStorageItem"; |
610 } | 613 } |
611 } else { | 614 } else { |
612 LOG(ERROR) << "Unexpected async status " << static_cast<int>(status); | 615 LOG(ERROR) << "Unexpected async status " << static_cast<int>(status); |
613 } | 616 } |
614 app_view_->OnFolderPickerCompleted(this, success_); | 617 app_view_->OnFolderPickerCompleted(this, success_); |
615 return S_OK; | 618 return S_OK; |
616 } | 619 } |
617 | 620 |
OLD | NEW |