Chromium Code Reviews| 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 <set> | 5 #include <set> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/nix/mime_util_xdg.h" | 11 #include "base/nix/mime_util_xdg.h" |
| 12 #include "base/nix/xdg_util.h" | 12 #include "base/nix/xdg_util.h" |
| 13 #include "base/process_util.h" | 13 #include "base/process_util.h" |
| 14 #include "base/string_number_conversions.h" | 14 #include "base/string_number_conversions.h" |
| 15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "base/threading/thread_restrictions.h" | |
| 16 #include "base/utf_string_conversions.h" | 17 #include "base/utf_string_conversions.h" |
| 17 #include "chrome/browser/ui/gtk/select_file_dialog_impl.h" | 18 #include "chrome/browser/ui/gtk/select_file_dialog_impl.h" |
| 18 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
| 19 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
| 20 #include "ui/base/l10n/l10n_util.h" | 21 #include "ui/base/l10n/l10n_util.h" |
| 21 | 22 |
| 22 // These conflict with base/tracked_objects.h, so need to come last. | 23 // These conflict with base/tracked_objects.h, so need to come last. |
| 23 #include <gdk/gdkx.h> | 24 #include <gdk/gdkx.h> // NOLINT |
|
jam
2012/03/01 01:25:15
ugh, why?
Lei Zhang
2012/03/01 01:33:19
I like to "gcl lint" CLs, and I'd like the linter
| |
| 24 #include <gtk/gtk.h> | 25 #include <gtk/gtk.h> // NOLINT |
| 25 | 26 |
| 26 using content::BrowserThread; | 27 using content::BrowserThread; |
| 27 | 28 |
| 28 namespace { | 29 namespace { |
| 29 | 30 |
| 30 std::string GetTitle(const std::string& title, int message_id) { | 31 std::string GetTitle(const std::string& title, int message_id) { |
| 31 return title.empty() ? l10n_util::GetStringUTF8(message_id) : title; | 32 return title.empty() ? l10n_util::GetStringUTF8(message_id) : title; |
| 32 } | 33 } |
| 33 | 34 |
| 34 const char kKdialogBinary[] = "kdialog"; | 35 const char kKdialogBinary[] = "kdialog"; |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 450 continue; | 451 continue; |
| 451 filenames_fp.push_back(path); | 452 filenames_fp.push_back(path); |
| 452 } | 453 } |
| 453 | 454 |
| 454 if (filenames_fp.empty()) { | 455 if (filenames_fp.empty()) { |
| 455 FileNotSelected(params); | 456 FileNotSelected(params); |
| 456 return; | 457 return; |
| 457 } | 458 } |
| 458 MultiFilesSelected(filenames_fp, params); | 459 MultiFilesSelected(filenames_fp, params); |
| 459 } | 460 } |
| OLD | NEW |