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

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

Issue 6145005: dont save username and password in the url that is used during... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | « no previous file | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 void InitialObserver::Append(const GURL& url) { 240 void InitialObserver::Append(const GURL& url) {
241 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 241 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
242 242
243 if (!on_the_record_switch || NULL == g_predictor) 243 if (!on_the_record_switch || NULL == g_predictor)
244 return; 244 return;
245 if (kStartupResolutionCount <= first_navigations_.size()) 245 if (kStartupResolutionCount <= first_navigations_.size())
246 return; 246 return;
247 247
248 if (url.SchemeIs("http") || url.SchemeIs("https")) { 248 if (url.SchemeIs("http") || url.SchemeIs("https")) {
249 const GURL url_without_path(url.GetWithEmptyPath()); 249 const GURL url_without_path(Predictor::CanonicalizeUrl(url));
250 if (first_navigations_.find(url_without_path) == first_navigations_.end()) 250 if (first_navigations_.find(url_without_path) == first_navigations_.end())
251 first_navigations_[url_without_path] = base::TimeTicks::Now(); 251 first_navigations_[url_without_path] = base::TimeTicks::Now();
252 } 252 }
253 } 253 }
254 254
255 void InitialObserver::GetInitialDnsResolutionList(ListValue* startup_list) { 255 void InitialObserver::GetInitialDnsResolutionList(ListValue* startup_list) {
256 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 256 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
257 DCHECK(startup_list); 257 DCHECK(startup_list);
258 startup_list->Clear(); 258 startup_list->Clear();
259 DCHECK_EQ(0u, startup_list->GetSize()); 259 DCHECK_EQ(0u, startup_list->GetSize());
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 DCHECK(!g_predictor); 625 DCHECK(!g_predictor);
626 InitNetworkPredictor(max_queueing_delay, max_parallel_resolves, user_prefs, 626 InitNetworkPredictor(max_queueing_delay, max_parallel_resolves, user_prefs,
627 local_state, preconnect_enabled); 627 local_state, preconnect_enabled);
628 } 628 }
629 } 629 }
630 630
631 PredictorInit::~PredictorInit() { 631 PredictorInit::~PredictorInit() {
632 } 632 }
633 633
634 } // namespace chrome_browser_net 634 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698