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

Side by Side Diff: chrome/browser/net/predictor.cc

Issue 8483003: Callback API Change: Reimplement Bind(); support IgnoreResult, full currying, and use less types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/net/predictor.h" 5 #include "chrome/browser/net/predictor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <set> 9 #include <set>
10 #include <sstream> 10 #include <sstream>
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 SaveDnsPrefetchStateForNextStartupAndTrimOnIOThread( 792 SaveDnsPrefetchStateForNextStartupAndTrimOnIOThread(
793 update_startup_list.Get(), 793 update_startup_list.Get(),
794 update_referral_list.Get(), 794 update_referral_list.Get(),
795 &completion, 795 &completion,
796 this); 796 this);
797 } else { 797 } else {
798 bool posted = BrowserThread::PostTask( 798 bool posted = BrowserThread::PostTask(
799 BrowserThread::IO, 799 BrowserThread::IO,
800 FROM_HERE, 800 FROM_HERE,
801 base::Bind( 801 base::Bind(
802 SaveDnsPrefetchStateForNextStartupAndTrimOnIOThread, 802 &SaveDnsPrefetchStateForNextStartupAndTrimOnIOThread,
803 update_startup_list.Get(), 803 update_startup_list.Get(),
804 update_referral_list.Get(), 804 update_referral_list.Get(),
805 &completion, 805 &completion,
806 this)); 806 this));
807 807
808 // TODO(jar): Synchronous waiting for the IO thread is a potential source 808 // TODO(jar): Synchronous waiting for the IO thread is a potential source
809 // to deadlocks and should be investigated. See http://crbug.com/78451. 809 // to deadlocks and should be investigated. See http://crbug.com/78451.
810 DCHECK(posted); 810 DCHECK(posted);
811 if (posted) 811 if (posted)
812 completion.Wait(); 812 completion.Wait();
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 PrefService* local_state, 1205 PrefService* local_state,
1206 IOThread* io_thread) { 1206 IOThread* io_thread) {
1207 // Empty function for unittests. 1207 // Empty function for unittests.
1208 } 1208 }
1209 1209
1210 void SimplePredictor::ShutdownOnUIThread(PrefService* user_prefs) { 1210 void SimplePredictor::ShutdownOnUIThread(PrefService* user_prefs) {
1211 SetShutdown(true); 1211 SetShutdown(true);
1212 } 1212 }
1213 1213
1214 } // namespace chrome_browser_net 1214 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/net_pref_observer.cc ('k') | chrome/browser/password_manager/password_store_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698