OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/import_dialog_gtk.h" | 5 #include "chrome/browser/gtk/import_dialog_gtk.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/gtk/accessible_widget_helper_gtk.h" | 12 #include "chrome/browser/gtk/accessible_widget_helper_gtk.h" |
13 #include "chrome/browser/gtk/gtk_util.h" | 13 #include "chrome/browser/gtk/gtk_util.h" |
14 #include "chrome/browser/importer/importer_data_types.h" | 14 #include "chrome/common/importer_data_types.h" |
15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
16 #include "grit/locale_settings.h" | 16 #include "grit/locale_settings.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // Returns true if the checkbox is checked. | 20 // Returns true if the checkbox is checked. |
21 gboolean IsChecked(GtkWidget* widget) { | 21 gboolean IsChecked(GtkWidget* widget) { |
22 return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); | 22 return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); |
23 } | 23 } |
24 | 24 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 if (IsChecked(bookmarks_)) | 193 if (IsChecked(bookmarks_)) |
194 items |= importer::FAVORITES; | 194 items |= importer::FAVORITES; |
195 if (IsChecked(search_engines_)) | 195 if (IsChecked(search_engines_)) |
196 items |= importer::SEARCH_ENGINES; | 196 items |= importer::SEARCH_ENGINES; |
197 if (IsChecked(passwords_)) | 197 if (IsChecked(passwords_)) |
198 items |= importer::PASSWORDS; | 198 items |= importer::PASSWORDS; |
199 if (IsChecked(history_)) | 199 if (IsChecked(history_)) |
200 items |= importer::HISTORY; | 200 items |= importer::HISTORY; |
201 return items; | 201 return items; |
202 } | 202 } |
OLD | NEW |