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

Side by Side Diff: chrome/browser/sync/test/integration/bookmarks_helper.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
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/sync/test/integration/bookmarks_helper.h" 5 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 const char* kPNGExtension = ".png"; 730 const char* kPNGExtension = ".png";
731 if (!EndsWith(path, kPNGExtension, false)) 731 if (!EndsWith(path, kPNGExtension, false))
732 return gfx::Image(); 732 return gfx::Image();
733 733
734 base::FilePath full_path; 734 base::FilePath full_path;
735 if (!PathService::Get(chrome::DIR_TEST_DATA, &full_path)) 735 if (!PathService::Get(chrome::DIR_TEST_DATA, &full_path))
736 return gfx::Image(); 736 return gfx::Image();
737 737
738 full_path = full_path.AppendASCII("sync").AppendASCII(path); 738 full_path = full_path.AppendASCII("sync").AppendASCII(path);
739 std::string contents; 739 std::string contents;
740 file_util::ReadFileToString(full_path, &contents); 740 base::ReadFileToString(full_path, &contents);
741 return gfx::Image::CreateFrom1xPNGBytes( 741 return gfx::Image::CreateFrom1xPNGBytes(
742 reinterpret_cast<const unsigned char*>(contents.data()), contents.size()); 742 reinterpret_cast<const unsigned char*>(contents.data()), contents.size());
743 } 743 }
744 744
745 std::string IndexedURL(int i) { 745 std::string IndexedURL(int i) {
746 return base::StringPrintf("http://www.host.ext:1234/path/filename/%d", i); 746 return base::StringPrintf("http://www.host.ext:1234/path/filename/%d", i);
747 } 747 }
748 748
749 std::wstring IndexedURLTitle(int i) { 749 std::wstring IndexedURLTitle(int i) {
750 return base::StringPrintf(L"URL Title %d", i); 750 return base::StringPrintf(L"URL Title %d", i);
751 } 751 }
752 752
753 std::wstring IndexedFolderName(int i) { 753 std::wstring IndexedFolderName(int i) {
754 return base::StringPrintf(L"Folder Name %d", i); 754 return base::StringPrintf(L"Folder Name %d", i);
755 } 755 }
756 756
757 std::wstring IndexedSubfolderName(int i) { 757 std::wstring IndexedSubfolderName(int i) {
758 return base::StringPrintf(L"Subfolder Name %d", i); 758 return base::StringPrintf(L"Subfolder Name %d", i);
759 } 759 }
760 760
761 std::wstring IndexedSubsubfolderName(int i) { 761 std::wstring IndexedSubsubfolderName(int i) {
762 return base::StringPrintf(L"Subsubfolder Name %d", i); 762 return base::StringPrintf(L"Subsubfolder Name %d", i);
763 } 763 }
764 764
765 } // namespace bookmarks_helper 765 } // namespace bookmarks_helper
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_unittest.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698