Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / file_select_helper.cc
index e2cb494..fa0004c 100644 (file)
@@ -8,8 +8,8 @@
 #include <utility>
 
 #include "base/bind.h"
-#include "base/file_util.h"
 #include "base/files/file_enumerator.h"
+#include "base/files/file_util.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
@@ -18,6 +18,7 @@
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_list.h"
 #include "chrome/browser/ui/chrome_select_file_policy.h"
+#include "chrome/grit/generated_resources.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/notification_details.h"
 #include "content/public/browser/notification_source.h"
@@ -26,7 +27,6 @@
 #include "content/public/browser/render_widget_host_view.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/common/file_chooser_params.h"
-#include "grit/generated_resources.h"
 #include "net/base/mime_util.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/shell_dialogs/selected_file_info.h"
@@ -365,7 +365,7 @@ void FileSelectHelper::RunFileChooserOnUIThread(
 
   select_file_dialog_ = ui::SelectFileDialog::Create(
       this, new ChromeSelectFilePolicy(web_contents_));
-  if (!select_file_dialog_)
+  if (!select_file_dialog_.get())
     return;
 
   dialog_mode_ = params.mode;
@@ -478,7 +478,7 @@ bool FileSelectHelper::IsAcceptTypeValid(const std::string& accept_type) {
   // 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 ||
+      base::StringToLowerASCII(accept_type) != accept_type ||
       base::TrimWhitespaceASCII(accept_type, base::TRIM_ALL, &unused) !=
           base::TRIM_NONE) {
     return false;