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

Unified Diff: tools/android/forwarder2/host_forwarder_main.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
« no previous file with comments | « storage/common/fileapi/file_system_util.cc ('k') | ui/display/chromeos/x11/display_util_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/forwarder2/host_forwarder_main.cc
diff --git a/tools/android/forwarder2/host_forwarder_main.cc b/tools/android/forwarder2/host_forwarder_main.cc
index 2fae616feef88783c6922151d7fd2a58044492ce..96136609f5351d424a703c7221de5c1c1a1e6ae6 100644
--- a/tools/android/forwarder2/host_forwarder_main.cc
+++ b/tools/android/forwarder2/host_forwarder_main.cc
@@ -240,7 +240,7 @@ class HostControllersManager {
const std::string prefix = base::StringPrintf("%d:", port);
for (HostControllerMap::const_iterator others = controllers_->begin();
others != controllers_->end(); ++others) {
- if (others->first.find(prefix) == 0U)
+ if (base::StartsWith(others->first, prefix, base::CompareCase::SENSITIVE))
return;
}
// No other port is being forwarded to this device:
@@ -318,7 +318,7 @@ class HostControllersManager {
class ServerDelegate : public Daemon::ServerDelegate {
public:
- ServerDelegate(const std::string& adb_path)
+ explicit ServerDelegate(const std::string& adb_path)
: adb_path_(adb_path), has_failed_(false) {}
bool has_failed() const {
@@ -370,7 +370,7 @@ class ServerDelegate : public Daemon::ServerDelegate {
class ClientDelegate : public Daemon::ClientDelegate {
public:
- ClientDelegate(const base::Pickle& command_pickle)
+ explicit ClientDelegate(const base::Pickle& command_pickle)
: command_pickle_(command_pickle), has_failed_(false) {}
bool has_failed() const { return has_failed_; }
« no previous file with comments | « storage/common/fileapi/file_system_util.cc ('k') | ui/display/chromeos/x11/display_util_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698