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

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

Issue 3056029: Move the number conversions from string_util to a new file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/metrics/metrics_service.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) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 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_api.h" 5 #include "chrome/browser/net/predictor_api.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/singleton.h" 10 #include "base/singleton.h"
11 #include "base/stats_counters.h" 11 #include "base/stats_counters.h"
12 #include "base/stl_util-inl.h" 12 #include "base/stl_util-inl.h"
13 #include "base/string_util.h" 13 #include "base/string_number_conversions.h"
14 #include "base/thread.h" 14 #include "base/thread.h"
15 #include "base/waitable_event.h" 15 #include "base/waitable_event.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "chrome/browser/browser.h" 17 #include "chrome/browser/browser.h"
18 #include "chrome/browser/browser_process.h" 18 #include "chrome/browser/browser_process.h"
19 #include "chrome/browser/chrome_thread.h" 19 #include "chrome/browser/chrome_thread.h"
20 #include "chrome/browser/io_thread.h" 20 #include "chrome/browser/io_thread.h"
21 #include "chrome/browser/net/url_info.h" 21 #include "chrome/browser/net/url_info.h"
22 #include "chrome/browser/net/preconnect.h" 22 #include "chrome/browser/net/preconnect.h"
23 #include "chrome/browser/net/referrer.h" 23 #include "chrome/browser/net/referrer.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 return; 303 return;
304 if (kStartupResolutionCount <= first_resolutions_.size()) 304 if (kStartupResolutionCount <= first_resolutions_.size())
305 return; // Someone just added the last item. 305 return; // Someone just added the last item.
306 306
307 // TODO(jar): Switch to using speculative_interceptor_ instead of 307 // TODO(jar): Switch to using speculative_interceptor_ instead of
308 // PrefetchObserver. 308 // PrefetchObserver.
309 bool is_ssl(443 == port); 309 bool is_ssl(443 == port);
310 std::string url_spec = is_ssl ? "https://" : "http://"; 310 std::string url_spec = is_ssl ? "https://" : "http://";
311 url_spec += host; 311 url_spec += host;
312 url_spec += ":"; 312 url_spec += ":";
313 url_spec += IntToString(port); 313 url_spec += base::IntToString(port);
314 314
315 GURL url(url_spec); 315 GURL url(url_spec);
316 first_resolutions_.insert(url); 316 first_resolutions_.insert(url);
317 } 317 }
318 318
319 void PrefetchObserver::GetInitialDnsResolutionList(ListValue* startup_list) { 319 void PrefetchObserver::GetInitialDnsResolutionList(ListValue* startup_list) {
320 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); 320 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
321 DCHECK(startup_list); 321 DCHECK(startup_list);
322 startup_list->Clear(); 322 startup_list->Clear();
323 DCHECK_EQ(0u, startup_list->GetSize()); 323 DCHECK_EQ(0u, startup_list->GetSize());
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 Preconnect::SetPreconnectDespiteProxy(proconnect_despite_proxy); 672 Preconnect::SetPreconnectDespiteProxy(proconnect_despite_proxy);
673 673
674 DCHECK(!predictor); 674 DCHECK(!predictor);
675 InitNetworkPredictor(max_queueing_delay, max_concurrent, user_prefs, 675 InitNetworkPredictor(max_queueing_delay, max_concurrent, user_prefs,
676 local_state, preconnect_enabled); 676 local_state, preconnect_enabled);
677 } 677 }
678 } 678 }
679 679
680 680
681 } // namespace chrome_browser_net 681 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/net/predictor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698