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

Side by Side Diff: chrome/utility/importer/bookmark_html_reader.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/utility/extensions/unpacker.cc ('k') | chrome/utility/importer/firefox_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/utility/importer/bookmark_html_reader.h" 5 #include "chrome/utility/importer/bookmark_html_reader.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/i18n/icu_string_conversions.h" 9 #include "base/i18n/icu_string_conversions.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 namespace bookmark_html_reader { 87 namespace bookmark_html_reader {
88 88
89 void ImportBookmarksFile( 89 void ImportBookmarksFile(
90 const base::Callback<bool(void)>& cancellation_callback, 90 const base::Callback<bool(void)>& cancellation_callback,
91 const base::Callback<bool(const GURL&)>& valid_url_callback, 91 const base::Callback<bool(const GURL&)>& valid_url_callback,
92 const base::FilePath& file_path, 92 const base::FilePath& file_path,
93 std::vector<ImportedBookmarkEntry>* bookmarks, 93 std::vector<ImportedBookmarkEntry>* bookmarks,
94 std::vector<ImportedFaviconUsage>* favicons) { 94 std::vector<ImportedFaviconUsage>* favicons) {
95 std::string content; 95 std::string content;
96 file_util::ReadFileToString(file_path, &content); 96 base::ReadFileToString(file_path, &content);
97 std::vector<std::string> lines; 97 std::vector<std::string> lines;
98 base::SplitString(content, '\n', &lines); 98 base::SplitString(content, '\n', &lines);
99 99
100 base::string16 last_folder; 100 base::string16 last_folder;
101 bool last_folder_on_toolbar = false; 101 bool last_folder_on_toolbar = false;
102 bool last_folder_is_empty = true; 102 bool last_folder_is_empty = true;
103 bool has_subfolder = false; 103 bool has_subfolder = false;
104 base::Time last_folder_add_date; 104 base::Time last_folder_add_date;
105 std::vector<base::string16> path; 105 std::vector<base::string16> path;
106 size_t toolbar_folder_index = 0; 106 size_t toolbar_folder_index = 0;
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 *url = GURL(value); 433 *url = GURL(value);
434 } 434 }
435 } 435 }
436 436
437 return true; 437 return true;
438 } 438 }
439 439
440 } // namespace internal 440 } // namespace internal
441 441
442 } // namespace bookmark_html_reader 442 } // namespace bookmark_html_reader
OLDNEW
« no previous file with comments | « chrome/utility/extensions/unpacker.cc ('k') | chrome/utility/importer/firefox_importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698