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

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

Issue 168953002: Cleanup: Move kChromeDevToolsScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 // The history system runs on a background thread so that potentially slow 5 // The history system runs on a background thread so that potentially slow
6 // database operations don't delay the browser. This backend processing is 6 // database operations don't delay the browser. This backend processing is
7 // represented by HistoryBackend. The HistoryService's job is to dispatch to 7 // represented by HistoryBackend. The HistoryService's job is to dispatch to
8 // that thread. 8 // that thread.
9 // 9 //
10 // Main thread History thread 10 // Main thread History thread
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 1001
1002 // static 1002 // static
1003 bool HistoryService::CanAddURL(const GURL& url) { 1003 bool HistoryService::CanAddURL(const GURL& url) {
1004 if (!url.is_valid()) 1004 if (!url.is_valid())
1005 return false; 1005 return false;
1006 1006
1007 // TODO: We should allow kChromeUIScheme URLs if they have been explicitly 1007 // TODO: We should allow kChromeUIScheme URLs if they have been explicitly
1008 // typed. Right now, however, these are marked as typed even when triggered 1008 // typed. Right now, however, these are marked as typed even when triggered
1009 // by a shortcut or menu action. 1009 // by a shortcut or menu action.
1010 if (url.SchemeIs(content::kJavaScriptScheme) || 1010 if (url.SchemeIs(content::kJavaScriptScheme) ||
1011 url.SchemeIs(chrome::kChromeDevToolsScheme) || 1011 url.SchemeIs(content::kChromeDevToolsScheme) ||
1012 url.SchemeIs(content::kChromeUIScheme) ||
1013 url.SchemeIs(content::kViewSourceScheme) ||
1012 url.SchemeIs(chrome::kChromeNativeScheme) || 1014 url.SchemeIs(chrome::kChromeNativeScheme) ||
1013 url.SchemeIs(content::kChromeUIScheme) ||
1014 url.SchemeIs(chrome::kChromeSearchScheme) || 1015 url.SchemeIs(chrome::kChromeSearchScheme) ||
1015 url.SchemeIs(chrome::kDomDistillerScheme) || 1016 url.SchemeIs(chrome::kDomDistillerScheme))
1016 url.SchemeIs(content::kViewSourceScheme))
1017 return false; 1017 return false;
1018 1018
1019 // Allow all about: and chrome: URLs except about:blank, since the user may 1019 // Allow all about: and chrome: URLs except about:blank, since the user may
1020 // like to see "chrome://memory/", etc. in their history and autocomplete. 1020 // like to see "chrome://memory/", etc. in their history and autocomplete.
1021 if (url == GURL(content::kAboutBlankURL)) 1021 if (url == GURL(content::kAboutBlankURL))
1022 return false; 1022 return false;
1023 1023
1024 return true; 1024 return true;
1025 } 1025 }
1026 1026
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 DCHECK(thread_checker_.CalledOnValidThread()); 1255 DCHECK(thread_checker_.CalledOnValidThread());
1256 visit_database_observers_.RemoveObserver(observer); 1256 visit_database_observers_.RemoveObserver(observer);
1257 } 1257 }
1258 1258
1259 void HistoryService::NotifyVisitDBObserversOnAddVisit( 1259 void HistoryService::NotifyVisitDBObserversOnAddVisit(
1260 const history::BriefVisitInfo& info) { 1260 const history::BriefVisitInfo& info) {
1261 DCHECK(thread_checker_.CalledOnValidThread()); 1261 DCHECK(thread_checker_.CalledOnValidThread());
1262 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, 1262 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_,
1263 OnAddVisit(info)); 1263 OnAddVisit(info));
1264 } 1264 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698