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

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

Issue 616763002: Importing certain bookmarks from firefox and HTML file as search engines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replacing custom code by existing function for checking if an url supports replacement terms. Created 6 years, 1 month 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
OLDNEW
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 #include "chrome/utility/importer/external_process_importer_bridge.h" 5 #include "chrome/utility/importer/external_process_importer_bridge.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/dump_without_crashing.h" 8 #include "base/debug/dump_without_crashing.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 Send(new ProfileImportProcessHostMsg_NotifyHistoryImportGroup( 128 Send(new ProfileImportProcessHostMsg_NotifyHistoryImportGroup(
129 row_group, visit_source)); 129 row_group, visit_source));
130 rows_left -= end_group - it; 130 rows_left -= end_group - it;
131 it = end_group; 131 it = end_group;
132 } 132 }
133 DCHECK_EQ(0, rows_left); 133 DCHECK_EQ(0, rows_left);
134 } 134 }
135 135
136 void ExternalProcessImporterBridge::SetKeywords( 136 void ExternalProcessImporterBridge::SetKeywords(
137 const std::vector<importer::URLKeywordInfo>& url_keywords, 137 const std::vector<importer::SearchEngineInfo>& search_engines,
138 bool unique_on_host_and_path) { 138 bool unique_on_host_and_path) {
139 Send(new ProfileImportProcessHostMsg_NotifyKeywordsReady( 139 Send(new ProfileImportProcessHostMsg_NotifyKeywordsReady(
140 url_keywords, unique_on_host_and_path)); 140 search_engines, unique_on_host_and_path));
141 } 141 }
142 142
143 void ExternalProcessImporterBridge::SetFirefoxSearchEnginesXMLData( 143 void ExternalProcessImporterBridge::SetFirefoxSearchEnginesXMLData(
144 const std::vector<std::string>& search_engine_data) { 144 const std::vector<std::string>& search_engine_data) {
145 Send(new ProfileImportProcessHostMsg_NotifyFirefoxSearchEngData( 145 Send(new ProfileImportProcessHostMsg_NotifyFirefoxSearchEngData(
146 search_engine_data)); 146 search_engine_data));
147 } 147 }
148 148
149 void ExternalProcessImporterBridge::SetPasswordForm( 149 void ExternalProcessImporterBridge::SetPasswordForm(
150 const autofill::PasswordForm& form) { 150 const autofill::PasswordForm& form) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 task_runner_->PostTask( 209 task_runner_->PostTask(
210 FROM_HERE, 210 FROM_HERE,
211 base::Bind(&ExternalProcessImporterBridge::SendInternal, 211 base::Bind(&ExternalProcessImporterBridge::SendInternal,
212 this, message)); 212 this, message));
213 } 213 }
214 214
215 void ExternalProcessImporterBridge::SendInternal(IPC::Message* message) { 215 void ExternalProcessImporterBridge::SendInternal(IPC::Message* message) {
216 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 216 DCHECK(task_runner_->RunsTasksOnCurrentThread());
217 sender_->Send(message); 217 sender_->Send(message);
218 } 218 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698