| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ |
| 6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ | 6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/files/file_path.h" |
| 13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 14 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 15 #include "chrome/browser/history/history_types.h" | 16 #include "chrome/browser/history/history_types.h" |
| 16 #include "chrome/browser/importer/importer_data_types.h" | 17 #include "chrome/browser/importer/importer_data_types.h" |
| 17 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
| 18 #include "content/public/browser/utility_process_host_client.h" | 19 #include "content/public/browser/utility_process_host_client.h" |
| 19 | 20 |
| 20 class ExternalProcessImporterHost; | 21 class ExternalProcessImporterHost; |
| 21 struct ImportedBookmarkEntry; | 22 struct ImportedBookmarkEntry; |
| 22 struct ImportedFaviconUsage; | 23 struct ImportedFaviconUsage; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 int visit_source); | 59 int visit_source); |
| 59 void OnHomePageImportReady(const GURL& home_page); | 60 void OnHomePageImportReady(const GURL& home_page); |
| 60 void OnBookmarksImportStart(const string16& first_folder_name, | 61 void OnBookmarksImportStart(const string16& first_folder_name, |
| 61 size_t total_bookmarks_count); | 62 size_t total_bookmarks_count); |
| 62 void OnBookmarksImportGroup( | 63 void OnBookmarksImportGroup( |
| 63 const std::vector<ImportedBookmarkEntry>& bookmarks_group); | 64 const std::vector<ImportedBookmarkEntry>& bookmarks_group); |
| 64 void OnFaviconsImportStart(size_t total_favicons_count); | 65 void OnFaviconsImportStart(size_t total_favicons_count); |
| 65 void OnFaviconsImportGroup( | 66 void OnFaviconsImportGroup( |
| 66 const std::vector<ImportedFaviconUsage>& favicons_group); | 67 const std::vector<ImportedFaviconUsage>& favicons_group); |
| 67 void OnPasswordFormImportReady(const content::PasswordForm& form); | 68 void OnPasswordFormImportReady(const content::PasswordForm& form); |
| 68 // WARNING: This function takes ownership of (and deletes) the pointers in | 69 void OnKeywordsImportReady( |
| 69 // |template_urls|! | 70 const std::vector<importer::URLKeywordInfo>& url_keywords, |
| 70 void OnKeywordsImportReady(const std::vector<TemplateURL*>& template_urls, | 71 bool unique_on_host_and_path); |
| 71 bool unique_on_host_and_path); | 72 void OnFirefoxSearchEngineDataReceived( |
| 73 const std::vector<std::string> search_engine_data); |
| 72 | 74 |
| 73 protected: | 75 protected: |
| 74 virtual ~ExternalProcessImporterClient(); | 76 virtual ~ExternalProcessImporterClient(); |
| 75 | 77 |
| 76 private: | 78 private: |
| 77 // Notifies the importerhost that import has finished, and calls Release(). | 79 // Notifies the importerhost that import has finished, and calls Release(). |
| 78 void Cleanup(); | 80 void Cleanup(); |
| 79 | 81 |
| 80 // Cancel import process on IO thread. | 82 // Cancel import process on IO thread. |
| 81 void CancelImportProcessOnIOThread(); | 83 void CancelImportProcessOnIOThread(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // ProfileWriter. | 126 // ProfileWriter. |
| 125 scoped_refptr<InProcessImporterBridge> bridge_; | 127 scoped_refptr<InProcessImporterBridge> bridge_; |
| 126 | 128 |
| 127 // True if import process has been cancelled. | 129 // True if import process has been cancelled. |
| 128 bool cancelled_; | 130 bool cancelled_; |
| 129 | 131 |
| 130 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterClient); | 132 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterClient); |
| 131 }; | 133 }; |
| 132 | 134 |
| 133 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ | 135 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ |
| OLD | NEW |