| 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 | 453 |
| 454 void ExternalProcessImporterClient::CancelImportProcessOnIOThread() { | 454 void ExternalProcessImporterClient::CancelImportProcessOnIOThread() { |
| 455 profile_import_process_host_->CancelProfileImportProcess(); | 455 profile_import_process_host_->CancelProfileImportProcess(); |
| 456 } | 456 } |
| 457 | 457 |
| 458 void ExternalProcessImporterClient::NotifyItemFinishedOnIOThread( | 458 void ExternalProcessImporterClient::NotifyItemFinishedOnIOThread( |
| 459 importer::ImportItem import_item) { | 459 importer::ImportItem import_item) { |
| 460 profile_import_process_host_->ReportImportItemFinished(import_item); | 460 profile_import_process_host_->ReportImportItemFinished(import_item); |
| 461 } | 461 } |
| 462 | 462 |
| 463 void ExternalProcessImporterClient::OnProcessCrashed() { | 463 void ExternalProcessImporterClient::OnProcessCrashed(int exit_code) { |
| 464 if (cancelled_) | 464 if (cancelled_) |
| 465 return; | 465 return; |
| 466 | 466 |
| 467 process_importer_host_->Cancel(); | 467 process_importer_host_->Cancel(); |
| 468 } | 468 } |
| 469 | 469 |
| 470 void ExternalProcessImporterClient::Cleanup() { | 470 void ExternalProcessImporterClient::Cleanup() { |
| 471 if (cancelled_) | 471 if (cancelled_) |
| 472 return; | 472 return; |
| 473 | 473 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 template_url_vec.reserve(template_urls.size()); | 609 template_url_vec.reserve(template_urls.size()); |
| 610 std::vector<TemplateURL>::const_iterator iter; | 610 std::vector<TemplateURL>::const_iterator iter; |
| 611 for (iter = template_urls.begin(); | 611 for (iter = template_urls.begin(); |
| 612 iter != template_urls.end(); | 612 iter != template_urls.end(); |
| 613 ++iter) { | 613 ++iter) { |
| 614 template_url_vec.push_back(new TemplateURL(*iter)); | 614 template_url_vec.push_back(new TemplateURL(*iter)); |
| 615 } | 615 } |
| 616 bridge_->SetKeywords(template_url_vec, default_keyword_index, | 616 bridge_->SetKeywords(template_url_vec, default_keyword_index, |
| 617 unique_on_host_and_path); | 617 unique_on_host_and_path); |
| 618 } | 618 } |
| OLD | NEW |