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

Side by Side Diff: chrome/browser/importer/safari_importer.mm

Issue 2725005: Fix password import for OS X Firefox.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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/profile_writer.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <Cocoa/Cocoa.h> 5 #include <Cocoa/Cocoa.h>
6 6
7 #include "chrome/browser/importer/safari_importer.h" 7 #include "chrome/browser/importer/safari_importer.h"
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 // Recursively read in bookmarks. 299 // Recursively read in bookmarks.
300 std::vector<std::wstring> parent_path_elements; 300 std::vector<std::wstring> parent_path_elements;
301 RecursiveReadBookmarksFolder(bookmarks_dict, parent_path_elements, false, 301 RecursiveReadBookmarksFolder(bookmarks_dict, parent_path_elements, false,
302 bookmarks); 302 bookmarks);
303 } 303 }
304 304
305 void SafariImporter::ImportPasswords() { 305 void SafariImporter::ImportPasswords() {
306 // Safari stores it's passwords in the Keychain, same as us so we don't need 306 // Safari stores it's passwords in the Keychain, same as us so we don't need
307 // to import them. 307 // to import them.
308 // Note: that we don't automatically pick them up, there is some logic around 308 // Note: that we don't automatically pick them up, there is some logic around
309 // the user needing to explicitly input his username in a page and bluring 309 // the user needing to explicitly input his username in a page and blurring
310 // the field before we pick it up, but the details of that are beyond the 310 // the field before we pick it up, but the details of that are beyond the
311 // scope of this comment. 311 // scope of this comment.
312 } 312 }
313 313
314 void SafariImporter::ImportHistory() { 314 void SafariImporter::ImportHistory() {
315 std::vector<history::URLRow> rows; 315 std::vector<history::URLRow> rows;
316 ParseHistoryItems(&rows); 316 ParseHistoryItems(&rows);
317 317
318 if (!rows.empty() && !cancelled()) { 318 if (!rows.empty() && !cancelled()) {
319 bridge_->SetHistoryItems(rows); 319 bridge_->SetHistoryItems(rows);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 if (!last_visit_str) 386 if (!last_visit_str)
387 continue; 387 continue;
388 388
389 // Convert Safari's last visit time to Unix Epoch time. 389 // Convert Safari's last visit time to Unix Epoch time.
390 double seconds_since_unix_epoch = HistoryTimeToEpochTime(last_visit_str); 390 double seconds_since_unix_epoch = HistoryTimeToEpochTime(last_visit_str);
391 row.set_last_visit(base::Time::FromDoubleT(seconds_since_unix_epoch)); 391 row.set_last_visit(base::Time::FromDoubleT(seconds_since_unix_epoch));
392 392
393 history_items->push_back(row); 393 history_items->push_back(row);
394 } 394 }
395 } 395 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/profile_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698