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

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

Issue 191293009: Cleanup: Move kAboutScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 // Update the referrer's duration. 447 // Update the referrer's duration.
448 UpdateVisitDuration(from_visit_id, request.time); 448 UpdateVisitDuration(from_visit_id, request.time);
449 } 449 }
450 } else { 450 } else {
451 // Redirect case. Add the redirect chain. 451 // Redirect case. Add the redirect chain.
452 452
453 content::PageTransition redirect_info = 453 content::PageTransition redirect_info =
454 content::PAGE_TRANSITION_CHAIN_START; 454 content::PAGE_TRANSITION_CHAIN_START;
455 455
456 RedirectList redirects = request.redirects; 456 RedirectList redirects = request.redirects;
457 if (redirects[0].SchemeIs(chrome::kAboutScheme)) { 457 if (redirects[0].SchemeIs(content::kAboutScheme)) {
458 // When the redirect source + referrer is "about" we skip it. This 458 // When the redirect source + referrer is "about" we skip it. This
459 // happens when a page opens a new frame/window to about:blank and then 459 // happens when a page opens a new frame/window to about:blank and then
460 // script sets the URL to somewhere else (used to hide the referrer). It 460 // script sets the URL to somewhere else (used to hide the referrer). It
461 // would be nice to keep all these redirects properly but we don't ever 461 // would be nice to keep all these redirects properly but we don't ever
462 // see the initial about:blank load, so we don't know where the 462 // see the initial about:blank load, so we don't know where the
463 // subsequent client redirect came from. 463 // subsequent client redirect came from.
464 // 464 //
465 // In this case, we just don't bother hooking up the source of the 465 // In this case, we just don't bother hooking up the source of the
466 // redirects, so we remove it. 466 // redirects, so we remove it.
467 redirects.erase(redirects.begin()); 467 redirects.erase(redirects.begin());
(...skipping 2459 matching lines...) Expand 10 before | Expand all | Expand 10 after
2927 int rank = kPageVisitStatsMaxTopSites; 2927 int rank = kPageVisitStatsMaxTopSites;
2928 std::map<GURL, int>::const_iterator it = most_visited_urls_map_.find(url); 2928 std::map<GURL, int>::const_iterator it = most_visited_urls_map_.find(url);
2929 if (it != most_visited_urls_map_.end()) 2929 if (it != most_visited_urls_map_.end())
2930 rank = (*it).second; 2930 rank = (*it).second;
2931 UMA_HISTOGRAM_ENUMERATION("History.TopSitesVisitsByRank", 2931 UMA_HISTOGRAM_ENUMERATION("History.TopSitesVisitsByRank",
2932 rank, kPageVisitStatsMaxTopSites + 1); 2932 rank, kPageVisitStatsMaxTopSites + 1);
2933 } 2933 }
2934 #endif 2934 #endif
2935 2935
2936 } // namespace history 2936 } // 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