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/history/history_backend.h" | 5 #include "chrome/browser/history/history_backend.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 bool has_redirects = request.redirects.size() > 1; | 493 bool has_redirects = request.redirects.size() > 1; |
494 if (content::PageTransitionIsMainFrame(request_transition) && | 494 if (content::PageTransitionIsMainFrame(request_transition) && |
495 (stripped_transition != content::PAGE_TRANSITION_TYPED) && | 495 (stripped_transition != content::PAGE_TRANSITION_TYPED) && |
496 !is_keyword_generated) { | 496 !is_keyword_generated) { |
497 const GURL& origin_url(has_redirects ? | 497 const GURL& origin_url(has_redirects ? |
498 request.redirects[0] : request.url); | 498 request.redirects[0] : request.url); |
499 if (origin_url.SchemeIs(chrome::kHttpScheme) || | 499 if (origin_url.SchemeIs(chrome::kHttpScheme) || |
500 origin_url.SchemeIs(chrome::kHttpsScheme) || | 500 origin_url.SchemeIs(chrome::kHttpsScheme) || |
501 origin_url.SchemeIs(chrome::kFtpScheme)) { | 501 origin_url.SchemeIs(chrome::kFtpScheme)) { |
502 std::string host(origin_url.host()); | 502 std::string host(origin_url.host()); |
503 if ((net::RegistryControlledDomainService::GetRegistryLength( | 503 size_t registry_length = |
504 host, false) == 0) && !db_->IsTypedHost(host)) { | 504 net::registry_controlled_domains::GetRegistryLength( |
| 505 host, |
| 506 net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES, |
| 507 net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); |
| 508 if (registry_length == 0 && !db_->IsTypedHost(host)) { |
505 stripped_transition = content::PAGE_TRANSITION_TYPED; | 509 stripped_transition = content::PAGE_TRANSITION_TYPED; |
506 request_transition = | 510 request_transition = |
507 content::PageTransitionFromInt( | 511 content::PageTransitionFromInt( |
508 stripped_transition | | 512 stripped_transition | |
509 content::PageTransitionGetQualifier(request_transition)); | 513 content::PageTransitionGetQualifier(request_transition)); |
510 } | 514 } |
511 } | 515 } |
512 } | 516 } |
513 | 517 |
514 if (!has_redirects) { | 518 if (!has_redirects) { |
(...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3090 info.url_id = visit.url_id; | 3094 info.url_id = visit.url_id; |
3091 info.time = visit.visit_time; | 3095 info.time = visit.visit_time; |
3092 info.transition = visit.transition; | 3096 info.transition = visit.transition; |
3093 // If we don't have a delegate yet during setup or shutdown, we will drop | 3097 // If we don't have a delegate yet during setup or shutdown, we will drop |
3094 // these notifications. | 3098 // these notifications. |
3095 if (delegate_) | 3099 if (delegate_) |
3096 delegate_->NotifyVisitDBObserversOnAddVisit(info); | 3100 delegate_->NotifyVisitDBObserversOnAddVisit(info); |
3097 } | 3101 } |
3098 | 3102 |
3099 } // namespace history | 3103 } // namespace history |
OLD | NEW |