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

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

Issue 14824006: Revert 198820 "Move FileEnumerator to its own file, do some refa..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/files/file_enumerator.h"
11 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop.h" 11 #include "base/message_loop.h"
13 #include "base/stl_util.h" 12 #include "base/stl_util.h"
14 #include "base/string_util.h" 13 #include "base/string_util.h"
15 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
16 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/history/history_types.h" 16 #include "chrome/browser/history/history_types.h"
18 #include "chrome/browser/importer/firefox2_importer.h" 17 #include "chrome/browser/importer/firefox2_importer.h"
19 #include "chrome/browser/importer/firefox_importer_utils.h" 18 #include "chrome/browser/importer/firefox_importer_utils.h"
20 #include "chrome/browser/importer/importer_bridge.h" 19 #include "chrome/browser/importer/importer_bridge.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // Firefox. 412 // Firefox.
414 base::FilePath locale_app_path = app_path.AppendASCII(locale_); 413 base::FilePath locale_app_path = app_path.AppendASCII(locale_);
415 base::FilePath default_locale_app_path = app_path.AppendASCII("en-US"); 414 base::FilePath default_locale_app_path = app_path.AppendASCII("en-US");
416 if (file_util::DirectoryExists(locale_app_path)) 415 if (file_util::DirectoryExists(locale_app_path))
417 app_path = locale_app_path; 416 app_path = locale_app_path;
418 else if (file_util::DirectoryExists(default_locale_app_path)) 417 else if (file_util::DirectoryExists(default_locale_app_path))
419 app_path = default_locale_app_path; 418 app_path = default_locale_app_path;
420 #endif 419 #endif
421 420
422 // Get search engine definition from file system. 421 // Get search engine definition from file system.
423 base::FileEnumerator engines(app_path, false, base::FileEnumerator::FILES); 422 file_util::FileEnumerator engines(app_path, false,
423 file_util::FileEnumerator::FILES);
424 for (base::FilePath engine_path = engines.Next(); 424 for (base::FilePath engine_path = engines.Next();
425 !engine_path.value().empty(); engine_path = engines.Next()) { 425 !engine_path.value().empty(); engine_path = engines.Next()) {
426 files->push_back(engine_path); 426 files->push_back(engine_path);
427 } 427 }
428 } 428 }
429 429
430 void Firefox3Importer::LoadRootNodeID(sql::Connection* db, 430 void Firefox3Importer::LoadRootNodeID(sql::Connection* db,
431 int* toolbar_folder_id, 431 int* toolbar_folder_id,
432 int* menu_folder_id, 432 int* menu_folder_id,
433 int* unsorted_folder_id) { 433 int* unsorted_folder_id) {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 562
563 if (!importer::ReencodeFavicon(&data[0], data.size(), &usage.png_data)) 563 if (!importer::ReencodeFavicon(&data[0], data.size(), &usage.png_data))
564 continue; // Unable to decode. 564 continue; // Unable to decode.
565 565
566 usage.urls = i->second; 566 usage.urls = i->second;
567 favicons->push_back(usage); 567 favicons->push_back(usage);
568 } 568 }
569 s.Reset(true); 569 s.Reset(true);
570 } 570 }
571 } 571 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/importer/firefox2_importer.cc ('k') | trunk/src/chrome/browser/importer/ie_importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698