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

Unified Diff: chrome/browser/memory/tab_manager_delegate_chromeos.cc

Issue 2127373006: Use base::StartWith() in more places when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/memory/tab_manager_delegate_chromeos.cc
diff --git a/chrome/browser/memory/tab_manager_delegate_chromeos.cc b/chrome/browser/memory/tab_manager_delegate_chromeos.cc
index 482efe35c44111ba25b9837e121bd96f85e14e03..a6a3d167a926834064717082cc73020cc73fa48c 100644
--- a/chrome/browser/memory/tab_manager_delegate_chromeos.cc
+++ b/chrome/browser/memory/tab_manager_delegate_chromeos.cc
@@ -72,7 +72,8 @@ bool IsArcWindow(aura::Window* window) {
if (!window || window->name() != kExoShellSurfaceWindowName)
return false;
std::string application_id = exo::ShellSurface::GetApplicationId(window);
- return application_id.find(kArcProcessNamePrefix) == 0;
+ return base::StartsWith(application_id, kArcProcessNamePrefix,
+ base::CompareCase::SENSITIVE);
}
bool IsArcWindowInForeground() {
@@ -284,15 +285,15 @@ int TabManagerDelegate::MemoryStat::EstimatedMemoryFreedKB(
}
class TabManagerDelegate::UmaReporter {
- public:
- UmaReporter()
- : last_kill_time_(), total_kills_(0) {}
- ~UmaReporter() {}
- void ReportKill(const int memory_freed);
-
- private:
- base::Time last_kill_time_;
- int total_kills_;
+ public:
+ UmaReporter() : total_kills_(0) {}
+ ~UmaReporter() {}
+
+ void ReportKill(const int memory_freed);
+
+ private:
+ base::Time last_kill_time_;
+ int total_kills_;
};
void TabManagerDelegate::UmaReporter::ReportKill(const int memory_freed) {

Powered by Google App Engine
This is Rietveld 408576698