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

Side by Side Diff: chrome/profile_import/profile_import_thread.cc

Issue 6693021: fav icon -> favicon. Pass 5: fav_icon -> favicon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 months 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/profile_import/profile_import_thread.h" 5 #include "chrome/profile_import/profile_import_thread.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/importer/importer_bridge.h" 10 #include "chrome/browser/importer/importer_bridge.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 it + kNumBookmarksToSend < bookmarks.end() ? 150 it + kNumBookmarksToSend < bookmarks.end() ?
151 it + kNumBookmarksToSend : bookmarks.end(); 151 it + kNumBookmarksToSend : bookmarks.end();
152 bookmark_group.assign(it, end_group); 152 bookmark_group.assign(it, end_group);
153 153
154 Send(new ProfileImportProcessHostMsg_NotifyBookmarksImportGroup( 154 Send(new ProfileImportProcessHostMsg_NotifyBookmarksImportGroup(
155 bookmark_group)); 155 bookmark_group));
156 } 156 }
157 } 157 }
158 158
159 void ProfileImportThread::NotifyFavIconsImportReady( 159 void ProfileImportThread::NotifyFavIconsImportReady(
160 const std::vector<history::ImportedFavIconUsage>& fav_icons) { 160 const std::vector<history::ImportedFavIconUsage>& favicons) {
161 Send(new ProfileImportProcessHostMsg_NotifyFavIconsImportStart( 161 Send(new ProfileImportProcessHostMsg_NotifyFavIconsImportStart(
162 fav_icons.size())); 162 favicons.size()));
163 163
164 std::vector<history::ImportedFavIconUsage>::const_iterator it; 164 std::vector<history::ImportedFavIconUsage>::const_iterator it;
165 for (it = fav_icons.begin(); it < fav_icons.end(); 165 for (it = favicons.begin(); it < favicons.end();
166 it = it + kNumFavIconsToSend) { 166 it = it + kNumFavIconsToSend) {
167 std::vector<history::ImportedFavIconUsage> fav_icons_group; 167 std::vector<history::ImportedFavIconUsage> favicons_group;
168 std::vector<history::ImportedFavIconUsage>::const_iterator end_group = 168 std::vector<history::ImportedFavIconUsage>::const_iterator end_group =
169 std::min(it + kNumFavIconsToSend, fav_icons.end()); 169 std::min(it + kNumFavIconsToSend, favicons.end());
170 fav_icons_group.assign(it, end_group); 170 favicons_group.assign(it, end_group);
171 171
172 Send(new ProfileImportProcessHostMsg_NotifyFavIconsImportGroup( 172 Send(new ProfileImportProcessHostMsg_NotifyFavIconsImportGroup(
173 fav_icons_group)); 173 favicons_group));
174 } 174 }
175 } 175 }
176 176
177 void ProfileImportThread::NotifyPasswordFormReady( 177 void ProfileImportThread::NotifyPasswordFormReady(
178 const webkit_glue::PasswordForm& form) { 178 const webkit_glue::PasswordForm& form) {
179 Send(new ProfileImportProcessHostMsg_NotifyPasswordFormReady(form)); 179 Send(new ProfileImportProcessHostMsg_NotifyPasswordFormReady(form));
180 } 180 }
181 181
182 void ProfileImportThread::NotifyKeywordsReady( 182 void ProfileImportThread::NotifyKeywordsReady(
183 const std::vector<TemplateURL*>& template_urls, 183 const std::vector<TemplateURL*>& template_urls,
184 int default_keyword_index, bool unique_on_host_and_path) { 184 int default_keyword_index, bool unique_on_host_and_path) {
185 std::vector<TemplateURL> urls; 185 std::vector<TemplateURL> urls;
186 for (size_t i = 0; i < template_urls.size(); ++i) { 186 for (size_t i = 0; i < template_urls.size(); ++i) {
187 urls.push_back(*template_urls[i]); 187 urls.push_back(*template_urls[i]);
188 } 188 }
189 Send(new ProfileImportProcessHostMsg_NotifyKeywordsReady(urls, 189 Send(new ProfileImportProcessHostMsg_NotifyKeywordsReady(urls,
190 default_keyword_index, unique_on_host_and_path)); 190 default_keyword_index, unique_on_host_and_path));
191 } 191 }
192 192
193 void ProfileImportThread::Cleanup() { 193 void ProfileImportThread::Cleanup() {
194 importer_->Cancel(); 194 importer_->Cancel();
195 importer_ = NULL; 195 importer_ = NULL;
196 bridge_ = NULL; 196 bridge_ = NULL;
197 ChildProcess::current()->ReleaseProcess(); 197 ChildProcess::current()->ReleaseProcess();
198 } 198 }
OLDNEW
« no previous file with comments | « chrome/profile_import/profile_import_thread.h ('k') | content/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698