| 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/extensions/api/bookmarks/bookmarks_api.h" | 5 #include "chrome/browser/extensions/api/bookmarks/bookmarks_api.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/i18n/file_util_icu.h" | 9 #include "base/i18n/file_util_icu.h" |
| 10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 if (type == ui::SelectFileDialog::SELECT_OPEN_FILE) | 939 if (type == ui::SelectFileDialog::SELECT_OPEN_FILE) |
| 940 file_type_info.support_drive = true; | 940 file_type_info.support_drive = true; |
| 941 // |web_contents| can be NULL (for background pages), which is fine. In such | 941 // |web_contents| can be NULL (for background pages), which is fine. In such |
| 942 // a case if file-selection dialogs are forbidden by policy, we will not | 942 // a case if file-selection dialogs are forbidden by policy, we will not |
| 943 // show an InfoBar, which is better than letting one appear out of the blue. | 943 // show an InfoBar, which is better than letting one appear out of the blue. |
| 944 select_file_dialog_->SelectFile(type, | 944 select_file_dialog_->SelectFile(type, |
| 945 string16(), | 945 string16(), |
| 946 default_path, | 946 default_path, |
| 947 &file_type_info, | 947 &file_type_info, |
| 948 0, | 948 0, |
| 949 FILE_PATH_LITERAL(""), | 949 base::FilePath::StringType(), |
| 950 NULL, | 950 NULL, |
| 951 NULL); | 951 NULL); |
| 952 } | 952 } |
| 953 | 953 |
| 954 void BookmarksIOFunction::FileSelectionCanceled(void* params) { | 954 void BookmarksIOFunction::FileSelectionCanceled(void* params) { |
| 955 Release(); // Balanced in BookmarksIOFunction::SelectFile() | 955 Release(); // Balanced in BookmarksIOFunction::SelectFile() |
| 956 } | 956 } |
| 957 | 957 |
| 958 void BookmarksIOFunction::MultiFilesSelected( | 958 void BookmarksIOFunction::MultiFilesSelected( |
| 959 const std::vector<base::FilePath>& files, void* params) { | 959 const std::vector<base::FilePath>& files, void* params) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 #if !defined(OS_ANDROID) | 999 #if !defined(OS_ANDROID) |
| 1000 // Android does not have support for the standard exporter. | 1000 // Android does not have support for the standard exporter. |
| 1001 // TODO(jgreenwald): remove ifdef once extensions are no longer built on | 1001 // TODO(jgreenwald): remove ifdef once extensions are no longer built on |
| 1002 // Android. | 1002 // Android. |
| 1003 bookmark_html_writer::WriteBookmarks(profile(), path, NULL); | 1003 bookmark_html_writer::WriteBookmarks(profile(), path, NULL); |
| 1004 #endif | 1004 #endif |
| 1005 Release(); // Balanced in BookmarksIOFunction::SelectFile() | 1005 Release(); // Balanced in BookmarksIOFunction::SelectFile() |
| 1006 } | 1006 } |
| 1007 | 1007 |
| 1008 } // namespace extensions | 1008 } // namespace extensions |
| OLD | NEW |