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

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

Issue 1033283002: Changed for loop to c++11 style in chrome/browser/prerender/prerender_local_predictor.cc:573. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to ToT Created 5 years, 8 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 | « AUTHORS ('k') | 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) 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 for (const unsigned char* p = front + kChecksumHashSize; 563 for (const unsigned char* p = front + kChecksumHashSize;
564 p < front + size; 564 p < front + size;
565 p += kURLHashSize) { 565 p += kURLHashSize) {
566 url_whitelist_.insert(URLHashToInt64(p)); 566 url_whitelist_.insert(URLHashToInt64(p));
567 } 567 }
568 RecordEvent(EVENT_URL_WHITELIST_OK); 568 RecordEvent(EVENT_URL_WHITELIST_OK);
569 } 569 }
570 570
571 PrerenderLocalPredictor::~PrerenderLocalPredictor() { 571 PrerenderLocalPredictor::~PrerenderLocalPredictor() {
572 Shutdown(); 572 Shutdown();
573 for (int i = 0; i < static_cast<int>(issued_prerenders_.size()); i++) { 573 for (PrerenderProperties* p : issued_prerenders_) {
574 PrerenderProperties* p = issued_prerenders_[i];
575 DCHECK(p != NULL); 574 DCHECK(p != NULL);
576 if (p->prerender_handle) 575 if (p->prerender_handle)
577 p->prerender_handle->OnCancel(); 576 p->prerender_handle->OnCancel();
578 } 577 }
579 STLDeleteContainerPairPointers( 578 STLDeleteContainerPairPointers(
580 outstanding_prerender_service_requests_.begin(), 579 outstanding_prerender_service_requests_.begin(),
581 outstanding_prerender_service_requests_.end()); 580 outstanding_prerender_service_requests_.end());
582 } 581 }
583 582
584 void PrerenderLocalPredictor::Shutdown() { 583 void PrerenderLocalPredictor::Shutdown() {
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 RecordEvent(EVENT_TAB_HELPER_URL_SEEN_NAMESPACE_MATCH); 1522 RecordEvent(EVENT_TAB_HELPER_URL_SEEN_NAMESPACE_MATCH);
1524 if (entry) 1523 if (entry)
1525 RecordEvent(EVENT_TAB_HELPER_URL_SEEN_NAMESPACE_MATCH_ENTRY); 1524 RecordEvent(EVENT_TAB_HELPER_URL_SEEN_NAMESPACE_MATCH_ENTRY);
1526 if (browser_navigate_initiated) 1525 if (browser_navigate_initiated)
1527 RecordEvent(EVENT_TAB_HELPER_URL_SEEN_NAMESPACE_MATCH_BROWSER_NAVIGATE); 1526 RecordEvent(EVENT_TAB_HELPER_URL_SEEN_NAMESPACE_MATCH_BROWSER_NAVIGATE);
1528 } 1527 }
1529 } 1528 }
1530 } 1529 }
1531 1530
1532 } // namespace prerender 1531 } // namespace prerender
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698