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

Unified Diff: components/copresence/copresence_manager_impl.cc

Issue 613043002: Switching to C++11 range-based for loops (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 6 years, 2 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 | « no previous file | components/copresence/rpc/rpc_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/copresence/copresence_manager_impl.cc
diff --git a/components/copresence/copresence_manager_impl.cc b/components/copresence/copresence_manager_impl.cc
index 87df6c64a632028613d07201b8da050ab55aba69..342ed1999a184cb59788612f951bb25175595bc7 100644
--- a/components/copresence/copresence_manager_impl.cc
+++ b/components/copresence/copresence_manager_impl.cc
@@ -64,17 +64,14 @@ void CopresenceManagerImpl::CompleteInitialization() {
if (!init_failed_)
rpc_handler_->ConnectToWhispernet();
- for (std::vector<PendingRequest>::iterator request =
- pending_requests_queue_.begin();
- request != pending_requests_queue_.end();
- ++request) {
+ for (PendingRequest& request : pending_requests_queue_) {
if (init_failed_) {
- request->callback.Run(FAIL);
+ request.callback.Run(FAIL);
} else {
rpc_handler_->SendReportRequest(
- make_scoped_ptr(new copresence::ReportRequest(request->report)),
- request->app_id,
- request->callback);
+ make_scoped_ptr(new copresence::ReportRequest(request.report)),
+ request.app_id,
+ request.callback);
}
}
pending_requests_queue_.clear();
« no previous file with comments | « no previous file | components/copresence/rpc/rpc_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698