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/importer/importer.h" | 5 #include "chrome/browser/importer/importer.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/thread.h" | 8 #include "base/thread.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 #elif defined(OS_MACOSX) | 35 #elif defined(OS_MACOSX) |
36 #include "chrome/browser/ui/cocoa/importer_lock_dialog.h" | 36 #include "chrome/browser/ui/cocoa/importer_lock_dialog.h" |
37 #elif defined(TOOLKIT_USES_GTK) | 37 #elif defined(TOOLKIT_USES_GTK) |
38 #include "chrome/browser/gtk/import_lock_dialog_gtk.h" | 38 #include "chrome/browser/gtk/import_lock_dialog_gtk.h" |
39 #endif | 39 #endif |
40 | 40 |
41 using webkit_glue::PasswordForm; | 41 using webkit_glue::PasswordForm; |
42 | 42 |
43 // Importer. | 43 // Importer. |
44 | 44 |
| 45 void Importer::Cancel() { cancelled_ = true; } |
| 46 |
45 Importer::Importer() | 47 Importer::Importer() |
46 : cancelled_(false), | 48 : cancelled_(false), |
47 import_to_bookmark_bar_(false), | 49 import_to_bookmark_bar_(false), |
48 bookmark_bar_disabled_(false) { | 50 bookmark_bar_disabled_(false) { |
49 } | 51 } |
50 | 52 |
51 Importer::~Importer() { | 53 Importer::~Importer() { |
52 } | 54 } |
53 | 55 |
54 // static | 56 // static |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 template_url_vec.reserve(template_urls.size()); | 609 template_url_vec.reserve(template_urls.size()); |
608 std::vector<TemplateURL>::const_iterator iter; | 610 std::vector<TemplateURL>::const_iterator iter; |
609 for (iter = template_urls.begin(); | 611 for (iter = template_urls.begin(); |
610 iter != template_urls.end(); | 612 iter != template_urls.end(); |
611 ++iter) { | 613 ++iter) { |
612 template_url_vec.push_back(new TemplateURL(*iter)); | 614 template_url_vec.push_back(new TemplateURL(*iter)); |
613 } | 615 } |
614 bridge_->SetKeywords(template_url_vec, default_keyword_index, | 616 bridge_->SetKeywords(template_url_vec, default_keyword_index, |
615 unique_on_host_and_path); | 617 unique_on_host_and_path); |
616 } | 618 } |
OLD | NEW |