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

Side by Side Diff: chrome/browser/importer/ie_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/firefox3_importer.cc ('k') | chrome/browser/importer/importer_bridge.h » ('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/ie_importer.h" 5 #include "chrome/browser/importer/ie_importer.h"
6 6
7 #include <ole2.h> 7 #include <ole2.h>
8 #include <intshcut.h> 8 #include <intshcut.h>
9 #include <pstore.h> 9 #include <pstore.h>
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 BookmarkVector bookmarks; 134 BookmarkVector bookmarks;
135 ParseFavoritesFolder(info, &bookmarks); 135 ParseFavoritesFolder(info, &bookmarks);
136 136
137 if (!bookmarks.empty() && !cancelled()) { 137 if (!bookmarks.empty() && !cancelled()) {
138 const string16& first_folder_name = 138 const string16& first_folder_name =
139 l10n_util::GetStringUTF16(IDS_BOOKMARK_GROUP_FROM_IE); 139 l10n_util::GetStringUTF16(IDS_BOOKMARK_GROUP_FROM_IE);
140 int options = 0; 140 int options = 0;
141 if (import_to_bookmark_bar()) 141 if (import_to_bookmark_bar())
142 options = ProfileWriter::IMPORT_TO_BOOKMARK_BAR; 142 options = ProfileWriter::IMPORT_TO_BOOKMARK_BAR;
143 bridge_->AddBookmarkEntries(bookmarks, first_folder_name, options); 143 bridge_->AddBookmarks(bookmarks, first_folder_name, options);
144 } 144 }
145 } 145 }
146 146
147 void IEImporter::ImportHistory() { 147 void IEImporter::ImportHistory() {
148 const std::string kSchemes[] = {chrome::kHttpScheme, 148 const std::string kSchemes[] = {chrome::kHttpScheme,
149 chrome::kHttpsScheme, 149 chrome::kHttpsScheme,
150 chrome::kFtpScheme, 150 chrome::kFtpScheme,
151 chrome::kFileScheme}; 151 chrome::kFileScheme};
152 int total_schemes = arraysize(kSchemes); 152 int total_schemes = arraysize(kSchemes);
153 153
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 if (version < 0) { 599 if (version < 0) {
600 wchar_t buffer[128]; 600 wchar_t buffer[128];
601 DWORD buffer_length = sizeof(buffer); 601 DWORD buffer_length = sizeof(buffer);
602 base::win::RegKey reg_key(HKEY_LOCAL_MACHINE, 602 base::win::RegKey reg_key(HKEY_LOCAL_MACHINE,
603 L"Software\\Microsoft\\Internet Explorer", KEY_READ); 603 L"Software\\Microsoft\\Internet Explorer", KEY_READ);
604 LONG result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL); 604 LONG result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL);
605 version = ((result == ERROR_SUCCESS)? _wtoi(buffer) : 0); 605 version = ((result == ERROR_SUCCESS)? _wtoi(buffer) : 0);
606 } 606 }
607 return version; 607 return version;
608 } 608 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/firefox3_importer.cc ('k') | chrome/browser/importer/importer_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698