OLD | NEW |
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/chromeos/extensions/file_manager/file_browser_private_a
pi.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/file_browser_private_a
pi.h" |
6 | 6 |
7 #include <sys/stat.h> | 7 #include <sys/stat.h> |
8 #include <sys/statvfs.h> | 8 #include <sys/statvfs.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 #include <utime.h> | 10 #include <utime.h> |
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 | 1089 |
1090 base::ListValue* file_url_list; | 1090 base::ListValue* file_url_list; |
1091 if (!args_->GetList(1, &file_url_list)) | 1091 if (!args_->GetList(1, &file_url_list)) |
1092 return false; | 1092 return false; |
1093 | 1093 |
1094 content::SiteInstance* site_instance = render_view_host()->GetSiteInstance(); | 1094 content::SiteInstance* site_instance = render_view_host()->GetSiteInstance(); |
1095 scoped_refptr<fileapi::FileSystemContext> context = | 1095 scoped_refptr<fileapi::FileSystemContext> context = |
1096 BrowserContext::GetStoragePartition(profile(), site_instance)-> | 1096 BrowserContext::GetStoragePartition(profile(), site_instance)-> |
1097 GetFileSystemContext(); | 1097 GetFileSystemContext(); |
1098 | 1098 |
1099 std::set<std::string> suffixes = GetUniqueSuffixes(file_url_list, context); | 1099 std::set<std::string> suffixes = |
| 1100 GetUniqueSuffixes(file_url_list, context.get()); |
1100 | 1101 |
1101 // MIME types are an optional parameter. | 1102 // MIME types are an optional parameter. |
1102 base::ListValue* mime_type_list; | 1103 base::ListValue* mime_type_list; |
1103 std::set<std::string> mime_types; | 1104 std::set<std::string> mime_types; |
1104 if (args_->GetList(2, &mime_type_list) && !mime_type_list->empty()) { | 1105 if (args_->GetList(2, &mime_type_list) && !mime_type_list->empty()) { |
1105 if (mime_type_list->GetSize() != file_url_list->GetSize()) | 1106 if (mime_type_list->GetSize() != file_url_list->GetSize()) |
1106 return false; | 1107 return false; |
1107 mime_types = GetUniqueMimeTypes(mime_type_list); | 1108 mime_types = GetUniqueMimeTypes(mime_type_list); |
1108 } | 1109 } |
1109 | 1110 |
(...skipping 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3085 OpenNewWindowFunction::OpenNewWindowFunction() {} | 3086 OpenNewWindowFunction::OpenNewWindowFunction() {} |
3086 | 3087 |
3087 OpenNewWindowFunction::~OpenNewWindowFunction() {} | 3088 OpenNewWindowFunction::~OpenNewWindowFunction() {} |
3088 | 3089 |
3089 bool OpenNewWindowFunction::RunImpl() { | 3090 bool OpenNewWindowFunction::RunImpl() { |
3090 std::string url; | 3091 std::string url; |
3091 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url)); | 3092 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url)); |
3092 file_manager_util::OpenNewWindow(profile_, GURL(url)); | 3093 file_manager_util::OpenNewWindow(profile_, GURL(url)); |
3093 return true; | 3094 return true; |
3094 } | 3095 } |
OLD | NEW |