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

Side by Side Diff: chrome/browser/search_engines/search_provider_install_data.cc

Issue 1782963002: Remove std::mem_fun uses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/search_engines/search_provider_install_data.h" 5 #include "chrome/browser/search_engines/search_provider_install_data.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 SetDefault(NULL); 299 SetDefault(NULL);
300 NotifyLoaded(); 300 NotifyLoaded();
301 } 301 }
302 302
303 void SearchProviderInstallData::NotifyLoaded() { 303 void SearchProviderInstallData::NotifyLoaded() {
304 DCHECK_CURRENTLY_ON(BrowserThread::IO); 304 DCHECK_CURRENTLY_ON(BrowserThread::IO);
305 305
306 std::vector<base::Closure> closure_queue; 306 std::vector<base::Closure> closure_queue;
307 closure_queue.swap(closure_queue_); 307 closure_queue.swap(closure_queue_);
308 308
309 std::for_each(closure_queue.begin(), 309 for (auto& closure : closure_queue)
310 closure_queue.end(), 310 closure.Run();
311 std::mem_fun_ref(&base::Closure::Run));
312 311
313 // Since we expect this request to be rare, clear out the information. This 312 // Since we expect this request to be rare, clear out the information. This
314 // also keeps the responses current as the search providers change. 313 // also keeps the responses current as the search providers change.
315 provider_map_.reset(); 314 provider_map_.reset();
316 SetDefault(NULL); 315 SetDefault(NULL);
317 } 316 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698