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