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

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

Issue 325443002: Move about://-related constants from //content to //url (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android ifx Created 6 years, 6 months 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 // Update the referrer's duration. 437 // Update the referrer's duration.
438 UpdateVisitDuration(from_visit_id, request.time); 438 UpdateVisitDuration(from_visit_id, request.time);
439 } 439 }
440 } else { 440 } else {
441 // Redirect case. Add the redirect chain. 441 // Redirect case. Add the redirect chain.
442 442
443 content::PageTransition redirect_info = 443 content::PageTransition redirect_info =
444 content::PAGE_TRANSITION_CHAIN_START; 444 content::PAGE_TRANSITION_CHAIN_START;
445 445
446 RedirectList redirects = request.redirects; 446 RedirectList redirects = request.redirects;
447 if (redirects[0].SchemeIs(content::kAboutScheme)) { 447 if (redirects[0].SchemeIs(url::kAboutScheme)) {
448 // When the redirect source + referrer is "about" we skip it. This 448 // When the redirect source + referrer is "about" we skip it. This
449 // happens when a page opens a new frame/window to about:blank and then 449 // happens when a page opens a new frame/window to about:blank and then
450 // script sets the URL to somewhere else (used to hide the referrer). It 450 // script sets the URL to somewhere else (used to hide the referrer). It
451 // would be nice to keep all these redirects properly but we don't ever 451 // would be nice to keep all these redirects properly but we don't ever
452 // see the initial about:blank load, so we don't know where the 452 // see the initial about:blank load, so we don't know where the
453 // subsequent client redirect came from. 453 // subsequent client redirect came from.
454 // 454 //
455 // In this case, we just don't bother hooking up the source of the 455 // In this case, we just don't bother hooking up the source of the
456 // redirects, so we remove it. 456 // redirects, so we remove it.
457 redirects.erase(redirects.begin()); 457 redirects.erase(redirects.begin());
(...skipping 2390 matching lines...) Expand 10 before | Expand all | Expand 10 after
2848 int rank = kPageVisitStatsMaxTopSites; 2848 int rank = kPageVisitStatsMaxTopSites;
2849 std::map<GURL, int>::const_iterator it = most_visited_urls_map_.find(url); 2849 std::map<GURL, int>::const_iterator it = most_visited_urls_map_.find(url);
2850 if (it != most_visited_urls_map_.end()) 2850 if (it != most_visited_urls_map_.end())
2851 rank = (*it).second; 2851 rank = (*it).second;
2852 UMA_HISTOGRAM_ENUMERATION("History.TopSitesVisitsByRank", 2852 UMA_HISTOGRAM_ENUMERATION("History.TopSitesVisitsByRank",
2853 rank, kPageVisitStatsMaxTopSites + 1); 2853 rank, kPageVisitStatsMaxTopSites + 1);
2854 } 2854 }
2855 #endif 2855 #endif
2856 2856
2857 } // namespace history 2857 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/guest_view/web_view/web_view_guest.cc ('k') | chrome/browser/history/history_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698