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

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

Issue 7056033: Style cleanup in bookmarks import code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests Created 9 years, 7 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
« 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) 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/firefox3_importer.h" 5 #include "chrome/browser/importer/firefox3_importer.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "app/sql/connection.h" 9 #include "app/sql/connection.h"
10 #include "app/sql/statement.h" 10 #include "app/sql/statement.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 STLDeleteContainerPointers(list.begin(), list.end()); 288 STLDeleteContainerPointers(list.begin(), list.end());
289 289
290 // Write into profile. 290 // Write into profile.
291 if (!bookmarks.empty() && !cancelled()) { 291 if (!bookmarks.empty() && !cancelled()) {
292 const string16& first_folder_name = 292 const string16& first_folder_name =
293 bridge_->GetLocalizedString(IDS_BOOKMARK_GROUP_FROM_FIREFOX); 293 bridge_->GetLocalizedString(IDS_BOOKMARK_GROUP_FROM_FIREFOX);
294 int options = 0; 294 int options = 0;
295 if (import_to_bookmark_bar()) 295 if (import_to_bookmark_bar())
296 options = ProfileWriter::IMPORT_TO_BOOKMARK_BAR; 296 options = ProfileWriter::IMPORT_TO_BOOKMARK_BAR;
297 bridge_->AddBookmarkEntries(bookmarks, first_folder_name, options); 297 bridge_->AddBookmarks(bookmarks, first_folder_name, options);
298 } 298 }
299 if (!template_urls.empty() && !cancelled()) { 299 if (!template_urls.empty() && !cancelled()) {
300 bridge_->SetKeywords(template_urls, -1, false); 300 bridge_->SetKeywords(template_urls, -1, false);
301 } else { 301 } else {
302 STLDeleteContainerPointers(template_urls.begin(), template_urls.end()); 302 STLDeleteContainerPointers(template_urls.begin(), template_urls.end());
303 } 303 }
304 if (!favicon_map.empty() && !cancelled()) { 304 if (!favicon_map.empty() && !cancelled()) {
305 std::vector<history::ImportedFaviconUsage> favicons; 305 std::vector<history::ImportedFaviconUsage> favicons;
306 LoadFavicons(&db, favicon_map, &favicons); 306 LoadFavicons(&db, favicon_map, &favicons);
307 bridge_->SetFavicons(favicons); 307 bridge_->SetFavicons(favicons);
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 577
578 if (!ReencodeFavicon(&data[0], data.size(), &usage.png_data)) 578 if (!ReencodeFavicon(&data[0], data.size(), &usage.png_data))
579 continue; // Unable to decode. 579 continue; // Unable to decode.
580 580
581 usage.urls = i->second; 581 usage.urls = i->second;
582 favicons->push_back(usage); 582 favicons->push_back(usage);
583 } 583 }
584 s.Reset(); 584 s.Reset();
585 } 585 }
586 } 586 }
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