Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Side by Side Diff: chrome/browser/importer/external_process_importer_bridge.cc

Issue 8680040: Group forms-related files in webkit/glue in a forms/ subdirectory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + another build fix Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/external_process_importer_bridge.h" 5 #include "chrome/browser/importer/external_process_importer_bridge.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/history/history_types.h" 11 #include "chrome/browser/history/history_types.h"
12 #include "chrome/browser/importer/profile_import_process_messages.h" 12 #include "chrome/browser/importer/profile_import_process_messages.h"
13 #include "webkit/glue/password_form.h" 13 #include "webkit/forms/password_form.h"
14 14
15 #if defined(OS_WIN) 15 #if defined(OS_WIN)
16 #include "chrome/browser/password_manager/ie7_password.h" 16 #include "chrome/browser/password_manager/ie7_password.h"
17 #endif 17 #endif
18 18
19 namespace { 19 namespace {
20 // Rather than sending all import items over IPC at once we chunk them into 20 // Rather than sending all import items over IPC at once we chunk them into
21 // separate requests. This avoids the case of a large import causing 21 // separate requests. This avoids the case of a large import causing
22 // oversized IPC messages. 22 // oversized IPC messages.
23 const int kNumBookmarksToSend = 100; 23 const int kNumBookmarksToSend = 100;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 bool unique_on_host_and_path) { 108 bool unique_on_host_and_path) {
109 std::vector<TemplateURL> urls; 109 std::vector<TemplateURL> urls;
110 for (size_t i = 0; i < template_urls.size(); ++i) { 110 for (size_t i = 0; i < template_urls.size(); ++i) {
111 urls.push_back(*template_urls[i]); 111 urls.push_back(*template_urls[i]);
112 } 112 }
113 Send(new ProfileImportProcessHostMsg_NotifyKeywordsReady(urls, 113 Send(new ProfileImportProcessHostMsg_NotifyKeywordsReady(urls,
114 default_keyword_index, unique_on_host_and_path)); 114 default_keyword_index, unique_on_host_and_path));
115 } 115 }
116 116
117 void ExternalProcessImporterBridge::SetPasswordForm( 117 void ExternalProcessImporterBridge::SetPasswordForm(
118 const webkit_glue::PasswordForm& form) { 118 const webkit::forms::PasswordForm& form) {
119 Send(new ProfileImportProcessHostMsg_NotifyPasswordFormReady(form)); 119 Send(new ProfileImportProcessHostMsg_NotifyPasswordFormReady(form));
120 } 120 }
121 121
122 void ExternalProcessImporterBridge::NotifyStarted() { 122 void ExternalProcessImporterBridge::NotifyStarted() {
123 Send(new ProfileImportProcessHostMsg_Import_Started()); 123 Send(new ProfileImportProcessHostMsg_Import_Started());
124 } 124 }
125 125
126 void ExternalProcessImporterBridge::NotifyItemStarted( 126 void ExternalProcessImporterBridge::NotifyItemStarted(
127 importer::ImportItem item) { 127 importer::ImportItem item) {
128 Send(new ProfileImportProcessHostMsg_ImportItem_Started(item)); 128 Send(new ProfileImportProcessHostMsg_ImportItem_Started(item));
(...skipping 11 matching lines...) Expand all
140 string16 message; 140 string16 message;
141 localized_strings_->GetString(base::IntToString(message_id), &message); 141 localized_strings_->GetString(base::IntToString(message_id), &message);
142 return message; 142 return message;
143 } 143 }
144 144
145 ExternalProcessImporterBridge::~ExternalProcessImporterBridge() {} 145 ExternalProcessImporterBridge::~ExternalProcessImporterBridge() {}
146 146
147 bool ExternalProcessImporterBridge::Send(IPC::Message* message) { 147 bool ExternalProcessImporterBridge::Send(IPC::Message* message) {
148 return sender_->Send(message); 148 return sender_->Send(message);
149 } 149 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/external_process_importer_bridge.h ('k') | chrome/browser/importer/external_process_importer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698