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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 return false; | 966 return false; |
967 } | 967 } |
968 if (in_index_timed_out == 1) | 968 if (in_index_timed_out == 1) |
969 *hinting_url_lookup_timed_out = true; | 969 *hinting_url_lookup_timed_out = true; |
970 info->MaybeAddCandidateURLFromService(GURL(url), | 970 info->MaybeAddCandidateURLFromService(GURL(url), |
971 priority, | 971 priority, |
972 in_index == 1, | 972 in_index == 1, |
973 !in_index_timed_out); | 973 !in_index_timed_out); |
974 } | 974 } |
975 if (list->GetSize() > 0) | 975 if (list->GetSize() > 0) |
976 RecordEvent(EVENT_PRERENDER_SERIVCE_RETURNED_HINTING_CANDIDATES); | 976 RecordEvent(EVENT_PRERENDER_SERVICE_RETURNED_HINTING_CANDIDATES); |
977 } | 977 } |
978 } | 978 } |
979 | 979 |
980 return true; | 980 return true; |
981 } | 981 } |
982 | 982 |
983 void PrerenderLocalPredictor::OnURLFetchComplete( | 983 void PrerenderLocalPredictor::OnURLFetchComplete( |
984 const net::URLFetcher* source) { | 984 const net::URLFetcher* source) { |
985 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 985 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
986 RecordEvent(EVENT_PRERENDER_SERVICE_RECEIVED_RESULT); | 986 RecordEvent(EVENT_PRERENDER_SERVICE_RECEIVED_RESULT); |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1526 break; | 1526 break; |
1527 case content::SessionStorageNamespace::MERGE_RESULT_MERGEABLE: | 1527 case content::SessionStorageNamespace::MERGE_RESULT_MERGEABLE: |
1528 RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_MERGEABLE); | 1528 RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_MERGEABLE); |
1529 break; | 1529 break; |
1530 default: | 1530 default: |
1531 NOTREACHED(); | 1531 NOTREACHED(); |
1532 } | 1532 } |
1533 } | 1533 } |
1534 | 1534 |
1535 } // namespace prerender | 1535 } // namespace prerender |
OLD | NEW |