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

Side by Side Diff: chrome/browser/prerender/prerender_local_predictor.cc

Issue 658943002: Revert of [src/chrome/browser/] Declaring the weak_ptr_factory in proper order in ui and prerender … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « chrome/browser/prerender/prerender_local_predictor.h ('k') | chrome/browser/ui/browser.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 "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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 is_history_service_observer_(false), 531 is_history_service_observer_(false),
532 prefetch_list_(new PrefetchList()), 532 weak_factory_(this),
533 weak_factory_(this) { 533 prefetch_list_(new PrefetchList()) {
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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 break; 1573 break;
1574 case content::SessionStorageNamespace::MERGE_RESULT_MERGEABLE: 1574 case content::SessionStorageNamespace::MERGE_RESULT_MERGEABLE:
1575 RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_MERGEABLE); 1575 RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_MERGEABLE);
1576 break; 1576 break;
1577 default: 1577 default:
1578 NOTREACHED(); 1578 NOTREACHED();
1579 } 1579 }
1580 } 1580 }
1581 1581
1582 } // namespace prerender 1582 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_local_predictor.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698