| 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 bool has_redirects = request.redirects.size() > 1; | 490 bool has_redirects = request.redirects.size() > 1; |
| 491 if (content::PageTransitionIsMainFrame(request_transition) && | 491 if (content::PageTransitionIsMainFrame(request_transition) && |
| 492 (stripped_transition != content::PAGE_TRANSITION_TYPED) && | 492 (stripped_transition != content::PAGE_TRANSITION_TYPED) && |
| 493 !is_keyword_generated) { | 493 !is_keyword_generated) { |
| 494 const GURL& origin_url(has_redirects ? | 494 const GURL& origin_url(has_redirects ? |
| 495 request.redirects[0] : request.url); | 495 request.redirects[0] : request.url); |
| 496 if (origin_url.SchemeIs(chrome::kHttpScheme) || | 496 if (origin_url.SchemeIs(chrome::kHttpScheme) || |
| 497 origin_url.SchemeIs(chrome::kHttpsScheme) || | 497 origin_url.SchemeIs(chrome::kHttpsScheme) || |
| 498 origin_url.SchemeIs(chrome::kFtpScheme)) { | 498 origin_url.SchemeIs(chrome::kFtpScheme)) { |
| 499 std::string host(origin_url.host()); | 499 std::string host(origin_url.host()); |
| 500 if ((net::RegistryControlledDomainService::GetRegistryLength( | 500 size_t registry_length = |
| 501 host, false) == 0) && !db_->IsTypedHost(host)) { | 501 net::registry_controlled_domains::GetRegistryLength( |
| 502 host, |
| 503 net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES, |
| 504 net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); |
| 505 if (registry_length == 0 && !db_->IsTypedHost(host)) { |
| 502 stripped_transition = content::PAGE_TRANSITION_TYPED; | 506 stripped_transition = content::PAGE_TRANSITION_TYPED; |
| 503 request_transition = | 507 request_transition = |
| 504 content::PageTransitionFromInt( | 508 content::PageTransitionFromInt( |
| 505 stripped_transition | | 509 stripped_transition | |
| 506 content::PageTransitionGetQualifier(request_transition)); | 510 content::PageTransitionGetQualifier(request_transition)); |
| 507 } | 511 } |
| 508 } | 512 } |
| 509 } | 513 } |
| 510 | 514 |
| 511 if (!has_redirects) { | 515 if (!has_redirects) { |
| (...skipping 2555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3067 info.url_id = visit.url_id; | 3071 info.url_id = visit.url_id; |
| 3068 info.time = visit.visit_time; | 3072 info.time = visit.visit_time; |
| 3069 info.transition = visit.transition; | 3073 info.transition = visit.transition; |
| 3070 // If we don't have a delegate yet during setup or shutdown, we will drop | 3074 // If we don't have a delegate yet during setup or shutdown, we will drop |
| 3071 // these notifications. | 3075 // these notifications. |
| 3072 if (delegate_.get()) | 3076 if (delegate_.get()) |
| 3073 delegate_->NotifyVisitDBObserversOnAddVisit(info); | 3077 delegate_->NotifyVisitDBObserversOnAddVisit(info); |
| 3074 } | 3078 } |
| 3075 | 3079 |
| 3076 } // namespace history | 3080 } // namespace history |
| OLD | NEW |