Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / browser / runtime_file_select_helper.cc
index 6b62aeb..176388e 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "base/bind.h"
 #include "base/file_util.h"
-#include "base/platform_file.h"
+#include "base/files/file.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
@@ -232,7 +232,7 @@ void RuntimeFileSelectHelper::OnListDone(int id, int error) {
 
 scoped_ptr<ui::SelectFileDialog::FileTypeInfo>
 RuntimeFileSelectHelper::GetFileTypesFromAcceptType(
-    const std::vector<string16>& accept_types) {
+    const std::vector<base::string16>& accept_types) {
   scoped_ptr<ui::SelectFileDialog::FileTypeInfo> base_file_type(
       new ui::SelectFileDialog::FileTypeInfo());
   base_file_type->support_drive = true;
@@ -251,7 +251,7 @@ RuntimeFileSelectHelper::GetFileTypesFromAcceptType(
   int valid_type_count = 0;
   int description_id = 0;
   for (size_t i = 0; i < accept_types.size(); ++i) {
-    std::string ascii_type = UTF16ToASCII(accept_types[i]);
+    std::string ascii_type = base::UTF16ToASCII(accept_types[i]);
     if (!IsAcceptTypeValid(ascii_type))
       continue;
 
@@ -403,7 +403,7 @@ void RuntimeFileSelectHelper::RunFileChooserOnUIThread(
 
 #if defined(OS_ANDROID)
   // Android needs the original MIME types and an additional capture value.
-  std::pair<std::vector<string16>, bool> accept_types =
+  std::pair<std::vector<base::string16>, bool> accept_types =
       std::make_pair(params.accept_types, params.capture);
 #endif
 
@@ -487,8 +487,10 @@ bool RuntimeFileSelectHelper::IsAcceptTypeValid(
   // of an extension or a "/" in the case of a MIME type).
   std::string unused;
   if (accept_type.length() <= 1 ||
-      StringToLowerASCII(accept_type) != accept_type ||
-      TrimWhitespaceASCII(accept_type, TRIM_ALL, &unused) != TRIM_NONE) {
+      base::StringToLowerASCII(accept_type) != accept_type ||
+      base::TrimWhitespaceASCII(
+        accept_type,
+        base::TRIM_ALL, &unused) != base::TRIM_NONE) {
     return false;
   }
   return true;