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

Side by Side Diff: google_apis/drive/test_util.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y 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
« no previous file with comments | « extensions/shell/common/shell_content_client_unittest.cc ('k') | google_apis/gaia/fake_gaia.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 (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 "google_apis/drive/test_util.h" 5 #include "google_apis/drive/test_util.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/json/json_file_value_serializer.h" 8 #include "base/json/json_file_value_serializer.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/rand_util.h" 12 #include "base/rand_util.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/string_split.h" 15 #include "base/strings/string_split.h"
16 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "google_apis/drive/drive_api_parser.h" 18 #include "google_apis/drive/drive_api_parser.h"
19 #include "net/test/embedded_test_server/http_request.h" 19 #include "net/test/embedded_test_server/http_request.h"
20 #include "net/test/embedded_test_server/http_response.h" 20 #include "net/test/embedded_test_server/http_response.h"
21 #include "url/gurl.h" 21 #include "url/gurl.h"
22 22
23 namespace google_apis { 23 namespace google_apis {
24 namespace test_util { 24 namespace test_util {
25 25
26 bool RemovePrefix(const std::string& input, 26 bool RemovePrefix(const std::string& input,
27 const std::string& prefix, 27 const std::string& prefix,
28 std::string* output) { 28 std::string* output) {
29 if (!base::StartsWithASCII(input, prefix, true /* case sensitive */)) 29 if (!base::StartsWith(input, prefix, base::CompareCase::SENSITIVE))
30 return false; 30 return false;
31 31
32 *output = input.substr(prefix.size()); 32 *output = input.substr(prefix.size());
33 return true; 33 return true;
34 } 34 }
35 35
36 base::FilePath GetTestFilePath(const std::string& relative_path) { 36 base::FilePath GetTestFilePath(const std::string& relative_path) {
37 base::FilePath path; 37 base::FilePath path;
38 if (!PathService::Get(base::DIR_SOURCE_ROOT, &path)) 38 if (!PathService::Get(base::DIR_SOURCE_ROOT, &path))
39 return base::FilePath(); 39 return base::FilePath();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 return result; 173 return result;
174 } 174 }
175 175
176 void TestGetContentCallback::OnGetContent(google_apis::DriveApiErrorCode error, 176 void TestGetContentCallback::OnGetContent(google_apis::DriveApiErrorCode error,
177 scoped_ptr<std::string> data) { 177 scoped_ptr<std::string> data) {
178 data_.push_back(data.release()); 178 data_.push_back(data.release());
179 } 179 }
180 180
181 } // namespace test_util 181 } // namespace test_util
182 } // namespace google_apis 182 } // namespace google_apis
OLDNEW
« no previous file with comments | « extensions/shell/common/shell_content_client_unittest.cc ('k') | google_apis/gaia/fake_gaia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698