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

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

Issue 23283007: Move kJavaScriptScheme into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: content:: is necessary in web_drag_source_mac.mm Created 7 years, 4 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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 } 995 }
996 996
997 // static 997 // static
998 bool HistoryService::CanAddURL(const GURL& url) { 998 bool HistoryService::CanAddURL(const GURL& url) {
999 if (!url.is_valid()) 999 if (!url.is_valid())
1000 return false; 1000 return false;
1001 1001
1002 // TODO: We should allow kChromeUIScheme URLs if they have been explicitly 1002 // TODO: We should allow kChromeUIScheme URLs if they have been explicitly
1003 // typed. Right now, however, these are marked as typed even when triggered 1003 // typed. Right now, however, these are marked as typed even when triggered
1004 // by a shortcut or menu action. 1004 // by a shortcut or menu action.
1005 if (url.SchemeIs(chrome::kJavaScriptScheme) || 1005 if (url.SchemeIs(content::kJavaScriptScheme) ||
1006 url.SchemeIs(chrome::kChromeDevToolsScheme) || 1006 url.SchemeIs(chrome::kChromeDevToolsScheme) ||
1007 url.SchemeIs(chrome::kChromeUIScheme) || 1007 url.SchemeIs(chrome::kChromeUIScheme) ||
1008 url.SchemeIs(content::kViewSourceScheme) || 1008 url.SchemeIs(content::kViewSourceScheme) ||
1009 url.SchemeIs(chrome::kChromeInternalScheme)) 1009 url.SchemeIs(chrome::kChromeInternalScheme))
1010 return false; 1010 return false;
1011 1011
1012 // Allow all about: and chrome: URLs except about:blank, since the user may 1012 // Allow all about: and chrome: URLs except about:blank, since the user may
1013 // like to see "chrome://memory/", etc. in their history and autocomplete. 1013 // like to see "chrome://memory/", etc. in their history and autocomplete.
1014 if (url == GURL(content::kAboutBlankURL)) 1014 if (url == GURL(content::kAboutBlankURL))
1015 return false; 1015 return false;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 DCHECK(thread_checker_.CalledOnValidThread()); 1274 DCHECK(thread_checker_.CalledOnValidThread());
1275 visit_database_observers_.RemoveObserver(observer); 1275 visit_database_observers_.RemoveObserver(observer);
1276 } 1276 }
1277 1277
1278 void HistoryService::NotifyVisitDBObserversOnAddVisit( 1278 void HistoryService::NotifyVisitDBObserversOnAddVisit(
1279 const history::BriefVisitInfo& info) { 1279 const history::BriefVisitInfo& info) {
1280 DCHECK(thread_checker_.CalledOnValidThread()); 1280 DCHECK(thread_checker_.CalledOnValidThread());
1281 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, 1281 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_,
1282 OnAddVisit(info)); 1282 OnAddVisit(info));
1283 } 1283 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698