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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 | 430 |
431 void ExternalProcessImporterClient::CancelImportProcessOnIOThread() { | 431 void ExternalProcessImporterClient::CancelImportProcessOnIOThread() { |
432 profile_import_process_host_->CancelProfileImportProcess(); | 432 profile_import_process_host_->CancelProfileImportProcess(); |
433 } | 433 } |
434 | 434 |
435 void ExternalProcessImporterClient::NotifyItemFinishedOnIOThread( | 435 void ExternalProcessImporterClient::NotifyItemFinishedOnIOThread( |
436 importer::ImportItem import_item) { | 436 importer::ImportItem import_item) { |
437 profile_import_process_host_->ReportImportItemFinished(import_item); | 437 profile_import_process_host_->ReportImportItemFinished(import_item); |
438 } | 438 } |
439 | 439 |
440 void ExternalProcessImporterClient::OnProcessCrashed() { | 440 void ExternalProcessImporterClient::OnProcessCrashed(int exit_code) { |
441 if (cancelled_) | 441 if (cancelled_) |
442 return; | 442 return; |
443 | 443 |
444 process_importer_host_->Cancel(); | 444 process_importer_host_->Cancel(); |
445 } | 445 } |
446 | 446 |
447 void ExternalProcessImporterClient::Cleanup() { | 447 void ExternalProcessImporterClient::Cleanup() { |
448 if (cancelled_) | 448 if (cancelled_) |
449 return; | 449 return; |
450 | 450 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 template_url_vec.reserve(template_urls.size()); | 586 template_url_vec.reserve(template_urls.size()); |
587 std::vector<TemplateURL>::const_iterator iter; | 587 std::vector<TemplateURL>::const_iterator iter; |
588 for (iter = template_urls.begin(); | 588 for (iter = template_urls.begin(); |
589 iter != template_urls.end(); | 589 iter != template_urls.end(); |
590 ++iter) { | 590 ++iter) { |
591 template_url_vec.push_back(new TemplateURL(*iter)); | 591 template_url_vec.push_back(new TemplateURL(*iter)); |
592 } | 592 } |
593 bridge_->SetKeywords(template_url_vec, default_keyword_index, | 593 bridge_->SetKeywords(template_url_vec, default_keyword_index, |
594 unique_on_host_and_path); | 594 unique_on_host_and_path); |
595 } | 595 } |
OLD | NEW |