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 #ifndef CHROME_PROFILE_IMPORT_PROFILE_IMPORT_THREAD_H_ | 5 #ifndef CHROME_PROFILE_IMPORT_PROFILE_IMPORT_THREAD_H_ |
6 #define CHROME_PROFILE_IMPORT_PROFILE_IMPORT_THREAD_H_ | 6 #define CHROME_PROFILE_IMPORT_PROFILE_IMPORT_THREAD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks, | 49 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks, |
50 const std::wstring& first_folder_name, int options); | 50 const std::wstring& first_folder_name, int options); |
51 void NotifyFavIconsImportReady( | 51 void NotifyFavIconsImportReady( |
52 const std::vector<history::ImportedFavIconUsage>& fav_icons); | 52 const std::vector<history::ImportedFavIconUsage>& fav_icons); |
53 void NotifyPasswordFormReady(const webkit_glue::PasswordForm& form); | 53 void NotifyPasswordFormReady(const webkit_glue::PasswordForm& form); |
54 void NotifyKeywordsReady(const std::vector<TemplateURL*>& template_urls, | 54 void NotifyKeywordsReady(const std::vector<TemplateURL*>& template_urls, |
55 int default_keyword_index, bool unique_on_host_and_path); | 55 int default_keyword_index, bool unique_on_host_and_path); |
56 | 56 |
57 private: | 57 private: |
58 // IPC messages | 58 // IPC messages |
59 virtual void OnControlMessageReceived(const IPC::Message& msg); | 59 virtual bool OnControlMessageReceived(const IPC::Message& msg); |
60 | 60 |
61 // Creates the importer and launches it in a new thread. Import is run on | 61 // Creates the importer and launches it in a new thread. Import is run on |
62 // a separate thread so that this thread can receive messages from the | 62 // a separate thread so that this thread can receive messages from the |
63 // main process (especially cancel requests) while the worker thread handles | 63 // main process (especially cancel requests) while the worker thread handles |
64 // the actual import. | 64 // the actual import. |
65 void OnImportStart( | 65 void OnImportStart( |
66 const importer::ProfileInfo& profile_info, | 66 const importer::ProfileInfo& profile_info, |
67 int items, | 67 int items, |
68 const DictionaryValue& localized_strings, | 68 const DictionaryValue& localized_strings, |
69 bool import_to_bookmark_bar); | 69 bool import_to_bookmark_bar); |
(...skipping 23 matching lines...) Expand all Loading... |
93 // A mask of importer::ImportItems. | 93 // A mask of importer::ImportItems. |
94 uint16 items_to_import_; | 94 uint16 items_to_import_; |
95 | 95 |
96 // Importer of the appropriate type (Firefox, Safari, IE, etc.) | 96 // Importer of the appropriate type (Firefox, Safari, IE, etc.) |
97 scoped_refptr<Importer> importer_; | 97 scoped_refptr<Importer> importer_; |
98 | 98 |
99 DISALLOW_COPY_AND_ASSIGN(ProfileImportThread); | 99 DISALLOW_COPY_AND_ASSIGN(ProfileImportThread); |
100 }; | 100 }; |
101 | 101 |
102 #endif // CHROME_PROFILE_IMPORT_PROFILE_IMPORT_THREAD_H_ | 102 #endif // CHROME_PROFILE_IMPORT_PROFILE_IMPORT_THREAD_H_ |
OLD | NEW |