1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/importer/profile_import_process_client.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/importer/profile_import_process_host.h"
#include "chrome/browser/importer/profile_import_process_messages.h"
#include "chrome/browser/search_engines/template_url.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_message_macros.h"
#include "webkit/glue/password_form.h"
ProfileImportProcessClient::ProfileImportProcessClient() {
}
void ProfileImportProcessClient::OnProcessCrashed(int exit_status) {
}
void ProfileImportProcessClient::OnImportStart() {
}
void ProfileImportProcessClient::OnImportFinished(
bool succeeded,
const std::string& error_msg) {
}
void ProfileImportProcessClient::OnImportItemStart(int item) {
}
void ProfileImportProcessClient::OnImportItemFinished(int item) {
}
void ProfileImportProcessClient::OnImportItemFailed(
const std::string& error_msg) {
}
void ProfileImportProcessClient::OnHistoryImportStart(
size_t total_history_rows_count) {
}
void ProfileImportProcessClient::OnHistoryImportGroup(
const std::vector<history::URLRow>& history_rows_group,
int visit_source) {
}
void ProfileImportProcessClient::OnHomePageImportReady(const GURL& home_page) {
}
void ProfileImportProcessClient::OnBookmarksImportStart(
const string16& first_folder_name,
size_t total_bookmarks_count) {
}
void ProfileImportProcessClient::OnBookmarksImportGroup(
const std::vector<ProfileWriter::BookmarkEntry>& bookmarks) {
}
void ProfileImportProcessClient::OnFaviconsImportStart(
size_t total_favicons_count) {
}
void ProfileImportProcessClient::OnFaviconsImportGroup(
const std::vector<history::ImportedFaviconUsage>& favicons_group) {
}
void ProfileImportProcessClient::OnPasswordFormImportReady(
const webkit_glue::PasswordForm& form) {
}
void ProfileImportProcessClient::OnKeywordsImportReady(
const std::vector<TemplateURL>& template_urls,
int default_keyword_index,
bool unique_on_host_and_path) {
}
bool ProfileImportProcessClient::OnMessageReceived(
const IPC::Message& message) {
bool msg_is_ok = true;
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_EX(ProfileImportProcessClient, message, msg_is_ok)
// Notification messages about the state of the import process.
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_Import_Started,
OnImportStart)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_Import_Finished,
OnImportFinished)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_ImportItem_Started,
OnImportItemStart)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_ImportItem_Finished,
OnImportItemFinished)
// Data messages containing items to be written to the user profile.
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyHistoryImportStart,
OnHistoryImportStart)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyHistoryImportGroup,
OnHistoryImportGroup)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyHomePageImportReady,
OnHomePageImportReady)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyBookmarksImportStart,
OnBookmarksImportStart)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyBookmarksImportGroup,
OnBookmarksImportGroup)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFaviconsImportStart,
OnFaviconsImportStart)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFaviconsImportGroup,
OnFaviconsImportGroup)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyPasswordFormReady,
OnPasswordFormImportReady)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyKeywordsReady,
OnKeywordsImportReady)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
return handled;
}
ProfileImportProcessClient::~ProfileImportProcessClient() {
}
|