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

Side by Side Diff: chrome/browser/extensions/api/file_system/file_system_api.cc

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/file_system/file_system_api.h" 5 #include "chrome/browser/extensions/api/file_system/file_system_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 scoped_ptr<ChooseEntry::Params> params(ChooseEntry::Params::Create(*args_)); 1056 scoped_ptr<ChooseEntry::Params> params(ChooseEntry::Params::Create(*args_));
1057 EXTENSION_FUNCTION_VALIDATE(params.get()); 1057 EXTENSION_FUNCTION_VALIDATE(params.get());
1058 1058
1059 base::FilePath suggested_name; 1059 base::FilePath suggested_name;
1060 ui::SelectFileDialog::FileTypeInfo file_type_info; 1060 ui::SelectFileDialog::FileTypeInfo file_type_info;
1061 ui::SelectFileDialog::Type picker_type = 1061 ui::SelectFileDialog::Type picker_type =
1062 ui::SelectFileDialog::SELECT_OPEN_FILE; 1062 ui::SelectFileDialog::SELECT_OPEN_FILE;
1063 1063
1064 file_system::ChooseEntryOptions* options = params->options.get(); 1064 file_system::ChooseEntryOptions* options = params->options.get();
1065 if (options) { 1065 if (options) {
1066 multiple_ = options->accepts_multiple; 1066 multiple_ = !!options->accepts_multiple;
1067 if (multiple_) 1067 if (multiple_)
1068 picker_type = ui::SelectFileDialog::SELECT_OPEN_MULTI_FILE; 1068 picker_type = ui::SelectFileDialog::SELECT_OPEN_MULTI_FILE;
1069 1069
1070 if (options->type == file_system::CHOOSE_ENTRY_TYPE_OPENWRITABLEFILE && 1070 if (options->type == file_system::CHOOSE_ENTRY_TYPE_OPENWRITABLEFILE &&
1071 !app_file_handler_util::HasFileSystemWritePermission( 1071 !app_file_handler_util::HasFileSystemWritePermission(
1072 extension_.get())) { 1072 extension_.get())) {
1073 error_ = kRequiresFileSystemWriteError; 1073 error_ = kRequiresFileSystemWriteError;
1074 return false; 1074 return false;
1075 } else if (options->type == file_system::CHOOSE_ENTRY_TYPE_SAVEFILE) { 1075 } else if (options->type == file_system::CHOOSE_ENTRY_TYPE_SAVEFILE) {
1076 if (!app_file_handler_util::HasFileSystemWritePermission( 1076 if (!app_file_handler_util::HasFileSystemWritePermission(
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 using api::file_system::Volume; 1457 using api::file_system::Volume;
1458 std::vector<linked_ptr<Volume>> result_volume_list; 1458 std::vector<linked_ptr<Volume>> result_volume_list;
1459 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); 1459 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list);
1460 1460
1461 return RespondNow(ArgumentList( 1461 return RespondNow(ArgumentList(
1462 api::file_system::GetVolumeList::Results::Create(result_volume_list))); 1462 api::file_system::GetVolumeList::Results::Create(result_volume_list)));
1463 } 1463 }
1464 #endif 1464 #endif
1465 1465
1466 } // namespace extensions 1466 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698