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

Unified Diff: chrome/browser/chromeos/policy/blocking_login_browsertest.cc

Issue 2127373006: Use base::StartWith() in more places when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, resolve conflict Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/blocking_login_browsertest.cc
diff --git a/chrome/browser/chromeos/policy/blocking_login_browsertest.cc b/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
index 32e622ab61edab86e9465d02ef47c58ee9bfd705..fc0df0d9525a05ec10bc691041e384096f253c7b 100644
--- a/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
+++ b/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "base/run_loop.h"
#include "base/stl_util.h"
+#include "base/strings/string_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/existing_user_controller.h"
@@ -177,8 +178,10 @@ class BlockingLoginTest
GaiaUrls* gaia = GaiaUrls::GetInstance();
if (request.relative_url == gaia->client_login_to_oauth2_url().path() ||
request.relative_url == gaia->oauth2_token_url().path() ||
- request.relative_url.find(kDMRegisterRequest) == 0 ||
- request.relative_url.find(kDMPolicyRequest) == 0) {
+ base::StartsWith(request.relative_url, kDMRegisterRequest,
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(request.relative_url, kDMPolicyRequest,
+ base::CompareCase::SENSITIVE)) {
if (!responses_.empty()) {
response.reset(responses_.back());
responses_.pop_back();
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_util.cc ('k') | chrome/browser/devtools/device/adb/mock_adb_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698