| 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 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 RecordEvent(EVENT_CONTINUE_PRERENDER_CHECK_LOGOUT_URL); | 1156 RecordEvent(EVENT_CONTINUE_PRERENDER_CHECK_LOGOUT_URL); |
| 1157 url_info.reset(NULL); | 1157 url_info.reset(NULL); |
| 1158 continue; | 1158 continue; |
| 1159 } | 1159 } |
| 1160 if (IsLogInURL(url_info->url)) { | 1160 if (IsLogInURL(url_info->url)) { |
| 1161 RecordEvent(EVENT_CONTINUE_PRERENDER_CHECK_LOGIN_URL); | 1161 RecordEvent(EVENT_CONTINUE_PRERENDER_CHECK_LOGIN_URL); |
| 1162 url_info.reset(NULL); | 1162 url_info.reset(NULL); |
| 1163 continue; | 1163 continue; |
| 1164 } | 1164 } |
| 1165 #if defined(FULL_SAFE_BROWSING) | 1165 #if defined(FULL_SAFE_BROWSING) |
| 1166 if (!SkipLocalPredictorWhitelist() && | 1166 if (!SkipLocalPredictorWhitelist() && sb_db_manager && |
| 1167 sb_db_manager->CheckSideEffectFreeWhitelistUrl(url_info->url)) { | 1167 sb_db_manager->CheckSideEffectFreeWhitelistUrl(url_info->url)) { |
| 1168 // If a page is on the side-effect free whitelist, we will just prerender | 1168 // If a page is on the side-effect free whitelist, we will just prerender |
| 1169 // it without any additional checks. | 1169 // it without any additional checks. |
| 1170 RecordEvent(EVENT_CONTINUE_PRERENDER_CHECK_ON_SIDE_EFFECT_FREE_WHITELIST); | 1170 RecordEvent(EVENT_CONTINUE_PRERENDER_CHECK_ON_SIDE_EFFECT_FREE_WHITELIST); |
| 1171 break; | 1171 break; |
| 1172 } | 1172 } |
| 1173 #endif | 1173 #endif |
| 1174 if (!SkipLocalPredictorServiceWhitelist() && | 1174 if (!SkipLocalPredictorServiceWhitelist() && |
| 1175 url_info->service_whitelist && url_info->service_whitelist_lookup_ok) { | 1175 url_info->service_whitelist && url_info->service_whitelist_lookup_ok) { |
| 1176 RecordEvent(EVENT_CONTINUE_PRERENDER_CHECK_ON_SERVICE_WHITELIST); | 1176 RecordEvent(EVENT_CONTINUE_PRERENDER_CHECK_ON_SERVICE_WHITELIST); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 break; | 1364 break; |
| 1365 case content::SessionStorageNamespace::MERGE_RESULT_MERGEABLE: | 1365 case content::SessionStorageNamespace::MERGE_RESULT_MERGEABLE: |
| 1366 RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_MERGEABLE); | 1366 RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_MERGEABLE); |
| 1367 break; | 1367 break; |
| 1368 default: | 1368 default: |
| 1369 NOTREACHED(); | 1369 NOTREACHED(); |
| 1370 } | 1370 } |
| 1371 } | 1371 } |
| 1372 | 1372 |
| 1373 } // namespace prerender | 1373 } // namespace prerender |
| OLD | NEW |