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

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

Issue 9471: Adds import/export of bookmarks to bookmarks.html file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/importer/firefox2_importer.cc ('k') | chrome/browser/importer/ie_importer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/firefox3_importer.h" 5 #include "chrome/browser/importer/firefox3_importer.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 item->title, UTF8ToWide(item->keyword), item->url); 240 item->title, UTF8ToWide(item->keyword), item->url);
241 if (t_url) 241 if (t_url)
242 template_urls.push_back(t_url); 242 template_urls.push_back(t_url);
243 } 243 }
244 244
245 STLDeleteContainerPointers(list.begin(), list.end()); 245 STLDeleteContainerPointers(list.begin(), list.end());
246 246
247 // Write into profile. 247 // Write into profile.
248 if (!bookmarks.empty() && !cancelled()) { 248 if (!bookmarks.empty() && !cancelled()) {
249 main_loop_->PostTask(FROM_HERE, NewRunnableMethod(writer_, 249 main_loop_->PostTask(FROM_HERE, NewRunnableMethod(writer_,
250 &ProfileWriter::AddBookmarkEntry, bookmarks, false)); 250 &ProfileWriter::AddBookmarkEntry, bookmarks,
251 l10n_util::GetString(IDS_BOOKMARK_GROUP_FROM_FIREFOX),
252 first_run() ? ProfileWriter::FIRST_RUN : 0));
251 } 253 }
252 if (!template_urls.empty() && !cancelled()) { 254 if (!template_urls.empty() && !cancelled()) {
253 main_loop_->PostTask(FROM_HERE, NewRunnableMethod(writer_, 255 main_loop_->PostTask(FROM_HERE, NewRunnableMethod(writer_,
254 &ProfileWriter::AddKeywords, template_urls, -1, false)); 256 &ProfileWriter::AddKeywords, template_urls, -1, false));
255 } else { 257 } else {
256 STLDeleteContainerPointers(template_urls.begin(), template_urls.end()); 258 STLDeleteContainerPointers(template_urls.begin(), template_urls.end());
257 } 259 }
258 if (!favicon_map.empty() && !cancelled()) { 260 if (!favicon_map.empty() && !cancelled()) {
259 std::vector<history::ImportedFavIconUsage> favicons; 261 std::vector<history::ImportedFavIconUsage> favicons;
260 LoadFavicons(db.get(), favicon_map, &favicons); 262 LoadFavicons(db.get(), favicon_map, &favicons);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 497
496 if (!ReencodeFavicon(&data[0], data.size(), &usage.png_data)) 498 if (!ReencodeFavicon(&data[0], data.size(), &usage.png_data))
497 continue; // Unable to decode. 499 continue; // Unable to decode.
498 500
499 usage.urls = i->second; 501 usage.urls = i->second;
500 favicons->push_back(usage); 502 favicons->push_back(usage);
501 } 503 }
502 s.reset(); 504 s.reset();
503 } 505 }
504 } 506 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/firefox2_importer.cc ('k') | chrome/browser/importer/ie_importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698