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

Side by Side Diff: chrome/browser/sync/test/integration/bookmarks_helper.cc

Issue 1233453011: Revert of Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
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 <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 SkBitmap bmp; 957 SkBitmap bmp;
958 bmp.allocN32Pixels(pixel_width, pixel_height); 958 bmp.allocN32Pixels(pixel_width, pixel_height);
959 bmp.eraseColor(color); 959 bmp.eraseColor(color);
960 favicon.AddRepresentation(gfx::ImageSkiaRep(bmp, scale)); 960 favicon.AddRepresentation(gfx::ImageSkiaRep(bmp, scale));
961 } 961 }
962 return gfx::Image(favicon); 962 return gfx::Image(favicon);
963 } 963 }
964 964
965 gfx::Image Create1xFaviconFromPNGFile(const std::string& path) { 965 gfx::Image Create1xFaviconFromPNGFile(const std::string& path) {
966 const char* kPNGExtension = ".png"; 966 const char* kPNGExtension = ".png";
967 if (!base::EndsWith(path, kPNGExtension, 967 if (!base::EndsWith(path, kPNGExtension, false))
968 base::CompareCase::INSENSITIVE_ASCII))
969 return gfx::Image(); 968 return gfx::Image();
970 969
971 base::FilePath full_path; 970 base::FilePath full_path;
972 if (!PathService::Get(chrome::DIR_TEST_DATA, &full_path)) 971 if (!PathService::Get(chrome::DIR_TEST_DATA, &full_path))
973 return gfx::Image(); 972 return gfx::Image();
974 973
975 full_path = full_path.AppendASCII("sync").AppendASCII(path); 974 full_path = full_path.AppendASCII("sync").AppendASCII(path);
976 std::string contents; 975 std::string contents;
977 base::ReadFileToString(full_path, &contents); 976 base::ReadFileToString(full_path, &contents);
978 return gfx::Image::CreateFrom1xPNGBytes( 977 return gfx::Image::CreateFrom1xPNGBytes(
(...skipping 14 matching lines...) Expand all
993 992
994 std::string IndexedSubfolderName(int i) { 993 std::string IndexedSubfolderName(int i) {
995 return base::StringPrintf("Subfolder Name %d", i); 994 return base::StringPrintf("Subfolder Name %d", i);
996 } 995 }
997 996
998 std::string IndexedSubsubfolderName(int i) { 997 std::string IndexedSubsubfolderName(int i) {
999 return base::StringPrintf("Subsubfolder Name %d", i); 998 return base::StringPrintf("Subsubfolder Name %d", i);
1000 } 999 }
1001 1000
1002 } // namespace bookmarks_helper 1001 } // namespace bookmarks_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698