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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. 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
« no previous file with comments | « chrome/browser/net/preconnect.cc ('k') | chrome/browser/net/predictor_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
29 #include "content/public/browser/browser_thread.h" 29 #include "content/public/browser/browser_thread.h"
30 #include "net/base/address_list.h" 30 #include "net/base/address_list.h"
31 #include "net/base/completion_callback.h" 31 #include "net/base/completion_callback.h"
32 #include "net/base/host_port_pair.h" 32 #include "net/base/host_port_pair.h"
33 #include "net/base/host_resolver.h" 33 #include "net/base/host_resolver.h"
34 #include "net/base/net_errors.h" 34 #include "net/base/net_errors.h"
35 #include "net/base/net_log.h" 35 #include "net/base/net_log.h"
36 #include "net/base/single_request_host_resolver.h" 36 #include "net/base/single_request_host_resolver.h"
37 37
38 using base::TimeDelta; 38 using base::TimeDelta;
39 using content::BrowserThread;
39 40
40 namespace chrome_browser_net { 41 namespace chrome_browser_net {
41 42
42 // static 43 // static
43 const int Predictor::kPredictorReferrerVersion = 2; 44 const int Predictor::kPredictorReferrerVersion = 2;
44 const double Predictor::kPreconnectWorthyExpectedValue = 0.8; 45 const double Predictor::kPreconnectWorthyExpectedValue = 0.8;
45 const double Predictor::kDNSPreresolutionWorthyExpectedValue = 0.1; 46 const double Predictor::kDNSPreresolutionWorthyExpectedValue = 0.1;
46 const double Predictor::kDiscardableExpectedValue = 0.05; 47 const double Predictor::kDiscardableExpectedValue = 0.05;
47 // The goal is of trimming is to to reduce the importance (number of expected 48 // The goal is of trimming is to to reduce the importance (number of expected
48 // subresources needed) by a factor of 2 after about 24 hours of uptime. We will 49 // subresources needed) by a factor of 2 after about 24 hours of uptime. We will
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 PrefService* local_state, 1207 PrefService* local_state,
1207 IOThread* io_thread) { 1208 IOThread* io_thread) {
1208 // Empty function for unittests. 1209 // Empty function for unittests.
1209 } 1210 }
1210 1211
1211 void SimplePredictor::ShutdownOnUIThread(PrefService* user_prefs) { 1212 void SimplePredictor::ShutdownOnUIThread(PrefService* user_prefs) {
1212 SetShutdown(true); 1213 SetShutdown(true);
1213 } 1214 }
1214 1215
1215 } // namespace chrome_browser_net 1216 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/preconnect.cc ('k') | chrome/browser/net/predictor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698