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 "components/history/core/browser/history_backend.h" | 5 #include "components/history/core/browser/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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 if (ui::PageTransitionIsMainFrame(request_transition) && | 487 if (ui::PageTransitionIsMainFrame(request_transition) && |
488 !ui::PageTransitionCoreTypeIs(request_transition, | 488 !ui::PageTransitionCoreTypeIs(request_transition, |
489 ui::PAGE_TRANSITION_TYPED) && | 489 ui::PAGE_TRANSITION_TYPED) && |
490 !is_keyword_generated) { | 490 !is_keyword_generated) { |
491 const GURL& origin_url(has_redirects ? request.redirects[0] : request.url); | 491 const GURL& origin_url(has_redirects ? request.redirects[0] : request.url); |
492 if (origin_url.SchemeIs(url::kHttpScheme) || | 492 if (origin_url.SchemeIs(url::kHttpScheme) || |
493 origin_url.SchemeIs(url::kHttpsScheme) || | 493 origin_url.SchemeIs(url::kHttpsScheme) || |
494 origin_url.SchemeIs(url::kFtpScheme)) { | 494 origin_url.SchemeIs(url::kFtpScheme)) { |
495 std::string host(origin_url.host()); | 495 std::string host(origin_url.host()); |
496 size_t registry_length = | 496 size_t registry_length = |
497 net::registry_controlled_domains::GetRegistryLength( | 497 net::registry_controlled_domains::GetCanonicalHostRegistryLength( |
498 host, | 498 host, |
499 net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES, | 499 net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES, |
500 net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); | 500 net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); |
501 if (registry_length == 0 && !db_->IsTypedHost(host)) { | 501 if (registry_length == 0 && !db_->IsTypedHost(host)) { |
502 request_transition = ui::PageTransitionFromInt( | 502 request_transition = ui::PageTransitionFromInt( |
503 ui::PAGE_TRANSITION_TYPED | | 503 ui::PAGE_TRANSITION_TYPED | |
504 ui::PageTransitionGetQualifier(request_transition)); | 504 ui::PageTransitionGetQualifier(request_transition)); |
505 } | 505 } |
506 } | 506 } |
507 } | 507 } |
(...skipping 2133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2641 // transaction is currently open. | 2641 // transaction is currently open. |
2642 db_->CommitTransaction(); | 2642 db_->CommitTransaction(); |
2643 db_->Vacuum(); | 2643 db_->Vacuum(); |
2644 db_->BeginTransaction(); | 2644 db_->BeginTransaction(); |
2645 db_->GetStartDate(&first_recorded_time_); | 2645 db_->GetStartDate(&first_recorded_time_); |
2646 | 2646 |
2647 return true; | 2647 return true; |
2648 } | 2648 } |
2649 | 2649 |
2650 } // namespace history | 2650 } // namespace history |
OLD | NEW |