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

Unified Diff: chrome/browser/lifetime/browser_close_manager.cc

Issue 2958223002: Use ContainsValue() instead of std::find() in chrome/browser and chrome/common (Closed)
Patch Set: Rebase patch. Created 3 years, 6 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/lifetime/browser_close_manager.cc
diff --git a/chrome/browser/lifetime/browser_close_manager.cc b/chrome/browser/lifetime/browser_close_manager.cc
index 443c1c78399b442cc46efda9543277577ad01dc1..59cd2f81309c2bbafc5b3cbbc317d44111587021 100644
--- a/chrome/browser/lifetime/browser_close_manager.cc
+++ b/chrome/browser/lifetime/browser_close_manager.cc
@@ -4,10 +4,10 @@
#include "chrome/browser/lifetime/browser_close_manager.h"
-#include <algorithm>
#include <iterator>
#include <vector>
+#include "base/stl_util.h"
#include "build/build_config.h"
#include "chrome/browser/background/background_mode_manager.h"
#include "chrome/browser/browser_process.h"
@@ -180,9 +180,7 @@ void BrowserCloseManager::CloseBrowsers() {
delete browser->tab_strip_model()->GetWebContentsAt(0);
browser->window()->DestroyBrowser();
// Destroying the browser should have removed it from the browser list.
- DCHECK(BrowserList::GetInstance()->end() ==
- std::find(BrowserList::GetInstance()->begin(),
- BrowserList::GetInstance()->end(), browser));
+ DCHECK(!base::ContainsValue(*BrowserList::GetInstance(), browser));
}
}
« no previous file with comments | « chrome/browser/internal_auth.cc ('k') | chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698