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

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

Issue 9635018: Remove static initializer in url_info.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove const Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/net/predictor.h ('k') | chrome/browser/net/url_info.h » ('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) 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 <time.h> 5 #include <time.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 10
(...skipping 26 matching lines...) Expand all
37 WaitForResolutionHelper(Predictor* predictor, const UrlList& hosts, 37 WaitForResolutionHelper(Predictor* predictor, const UrlList& hosts,
38 HelperTimer* timer) 38 HelperTimer* timer)
39 : predictor_(predictor), 39 : predictor_(predictor),
40 hosts_(hosts), 40 hosts_(hosts),
41 timer_(timer) { 41 timer_(timer) {
42 } 42 }
43 43
44 void Run() { 44 void Run() {
45 for (UrlList::const_iterator i = hosts_.begin(); i != hosts_.end(); ++i) 45 for (UrlList::const_iterator i = hosts_.begin(); i != hosts_.end(); ++i)
46 if (predictor_->GetResolutionDuration(*i) == 46 if (predictor_->GetResolutionDuration(*i) ==
47 UrlInfo::kNullDuration) 47 UrlInfo::NullDuration())
48 return; // We don't have resolution for that host. 48 return; // We don't have resolution for that host.
49 49
50 // When all hostnames have been resolved, exit the loop. 50 // When all hostnames have been resolved, exit the loop.
51 timer_->Stop(); 51 timer_->Stop();
52 MessageLoop::current()->Quit(); 52 MessageLoop::current()->Quit();
53 delete timer_; 53 delete timer_;
54 delete this; 54 delete this;
55 } 55 }
56 56
57 private: 57 private:
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 EXPECT_EQ(2U, referral_list.GetSize()); 668 EXPECT_EQ(2U, referral_list.GetSize());
669 669
670 predictor.DiscardAllResults(); 670 predictor.DiscardAllResults();
671 predictor.SerializeReferrers(&referral_list); 671 predictor.SerializeReferrers(&referral_list);
672 EXPECT_EQ(1U, referral_list.GetSize()); 672 EXPECT_EQ(1U, referral_list.GetSize());
673 673
674 predictor.Shutdown(); 674 predictor.Shutdown();
675 } 675 }
676 676
677 } // namespace chrome_browser_net 677 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/predictor.h ('k') | chrome/browser/net/url_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698