OLD | NEW |
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 "chrome/browser/prerender/prerender_local_predictor.h" | 5 #include "chrome/browser/prerender/prerender_local_predictor.h" |
6 | 6 |
7 #include <ctype.h> | 7 #include <ctype.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 } | 521 } |
522 | 522 |
523 base::hash_map<string, ListEntry*> entries_; | 523 base::hash_map<string, ListEntry*> entries_; |
524 std::list<ListEntry*> entry_list_; | 524 std::list<ListEntry*> entry_list_; |
525 DISALLOW_COPY_AND_ASSIGN(PrefetchList); | 525 DISALLOW_COPY_AND_ASSIGN(PrefetchList); |
526 }; | 526 }; |
527 | 527 |
528 PrerenderLocalPredictor::PrerenderLocalPredictor( | 528 PrerenderLocalPredictor::PrerenderLocalPredictor( |
529 PrerenderManager* prerender_manager) | 529 PrerenderManager* prerender_manager) |
530 : prerender_manager_(prerender_manager), | 530 : prerender_manager_(prerender_manager), |
531 weak_factory_(this), | |
532 prefetch_list_(new PrefetchList()), | 531 prefetch_list_(new PrefetchList()), |
533 history_service_observer_(this) { | 532 history_service_observer_(this), |
| 533 weak_factory_(this) { |
534 RecordEvent(EVENT_CONSTRUCTED); | 534 RecordEvent(EVENT_CONSTRUCTED); |
535 if (base::MessageLoop::current()) { | 535 if (base::MessageLoop::current()) { |
536 timer_.Start(FROM_HERE, | 536 timer_.Start(FROM_HERE, |
537 base::TimeDelta::FromMilliseconds(kInitDelayMs), | 537 base::TimeDelta::FromMilliseconds(kInitDelayMs), |
538 this, | 538 this, |
539 &PrerenderLocalPredictor::Init); | 539 &PrerenderLocalPredictor::Init); |
540 RecordEvent(EVENT_INIT_SCHEDULED); | 540 RecordEvent(EVENT_INIT_SCHEDULED); |
541 } | 541 } |
542 | 542 |
543 static const size_t kChecksumHashSize = 32; | 543 static const size_t kChecksumHashSize = 32; |
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1567 break; | 1567 break; |
1568 case content::SessionStorageNamespace::MERGE_RESULT_MERGEABLE: | 1568 case content::SessionStorageNamespace::MERGE_RESULT_MERGEABLE: |
1569 RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_MERGEABLE); | 1569 RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_MERGEABLE); |
1570 break; | 1570 break; |
1571 default: | 1571 default: |
1572 NOTREACHED(); | 1572 NOTREACHED(); |
1573 } | 1573 } |
1574 } | 1574 } |
1575 | 1575 |
1576 } // namespace prerender | 1576 } // namespace prerender |
OLD | NEW |