Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: chrome/browser/history/history_backend.cc

Issue 97683002: Move kFtpScheme into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 // change the transition to TYPED so that the omnibox will learn that this is 402 // change the transition to TYPED so that the omnibox will learn that this is
403 // a known host. 403 // a known host.
404 bool has_redirects = request.redirects.size() > 1; 404 bool has_redirects = request.redirects.size() > 1;
405 if (content::PageTransitionIsMainFrame(request_transition) && 405 if (content::PageTransitionIsMainFrame(request_transition) &&
406 (stripped_transition != content::PAGE_TRANSITION_TYPED) && 406 (stripped_transition != content::PAGE_TRANSITION_TYPED) &&
407 !is_keyword_generated) { 407 !is_keyword_generated) {
408 const GURL& origin_url(has_redirects ? 408 const GURL& origin_url(has_redirects ?
409 request.redirects[0] : request.url); 409 request.redirects[0] : request.url);
410 if (origin_url.SchemeIs(content::kHttpScheme) || 410 if (origin_url.SchemeIs(content::kHttpScheme) ||
411 origin_url.SchemeIs(content::kHttpsScheme) || 411 origin_url.SchemeIs(content::kHttpsScheme) ||
412 origin_url.SchemeIs(chrome::kFtpScheme)) { 412 origin_url.SchemeIs(content::kFtpScheme)) {
413 std::string host(origin_url.host()); 413 std::string host(origin_url.host());
414 size_t registry_length = 414 size_t registry_length =
415 net::registry_controlled_domains::GetRegistryLength( 415 net::registry_controlled_domains::GetRegistryLength(
416 host, 416 host,
417 net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES, 417 net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES,
418 net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); 418 net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES);
419 if (registry_length == 0 && !db_->IsTypedHost(host)) { 419 if (registry_length == 0 && !db_->IsTypedHost(host)) {
420 stripped_transition = content::PAGE_TRANSITION_TYPED; 420 stripped_transition = content::PAGE_TRANSITION_TYPED;
421 request_transition = 421 request_transition =
422 content::PageTransitionFromInt( 422 content::PageTransitionFromInt(
(...skipping 2526 matching lines...) Expand 10 before | Expand all | Expand 10 after
2949 int rank = kPageVisitStatsMaxTopSites; 2949 int rank = kPageVisitStatsMaxTopSites;
2950 std::map<GURL, int>::const_iterator it = most_visited_urls_map_.find(url); 2950 std::map<GURL, int>::const_iterator it = most_visited_urls_map_.find(url);
2951 if (it != most_visited_urls_map_.end()) 2951 if (it != most_visited_urls_map_.end())
2952 rank = (*it).second; 2952 rank = (*it).second;
2953 UMA_HISTOGRAM_ENUMERATION("History.TopSitesVisitsByRank", 2953 UMA_HISTOGRAM_ENUMERATION("History.TopSitesVisitsByRank",
2954 rank, kPageVisitStatsMaxTopSites + 1); 2954 rank, kPageVisitStatsMaxTopSites + 1);
2955 } 2955 }
2956 #endif 2956 #endif
2957 2957
2958 } // namespace history 2958 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/web_request/web_request_permissions.cc ('k') | chrome/browser/history/in_memory_url_index.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698