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

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

Issue 28170: More URL constants replacement. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/crash_recovery_uitest.cc ('k') | chrome/browser/history/url_database.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 bool HistoryService::CanAddURL(const GURL& url) const { 571 bool HistoryService::CanAddURL(const GURL& url) const {
572 if (!url.is_valid()) 572 if (!url.is_valid())
573 return false; 573 return false;
574 574
575 if (url.SchemeIs(chrome::kJavaScriptScheme) || 575 if (url.SchemeIs(chrome::kJavaScriptScheme) ||
576 url.SchemeIs(chrome::kChromeUIScheme) || 576 url.SchemeIs(chrome::kChromeUIScheme) ||
577 url.SchemeIs(chrome::kViewSourceScheme)) 577 url.SchemeIs(chrome::kViewSourceScheme))
578 return false; 578 return false;
579 579
580 if (url.SchemeIs(chrome::kAboutScheme)) { 580 if (url.SchemeIs(chrome::kAboutScheme)) {
581 std::string path = url.path(); 581 if (LowerCaseEqualsASCII(url.spec(), chrome::kAboutBlankURL))
582 if (path.empty() || LowerCaseEqualsASCII(path, "blank"))
583 return false; 582 return false;
584 // We allow all other about URLs since the user may like to see things 583 // We allow all other about URLs since the user may like to see things
585 // like "about:memory" or "about:histograms" in their history and 584 // like "about:memory" or "about:histograms" in their history and
586 // autocomplete. 585 // autocomplete.
587 } 586 }
588 587
589 return true; 588 return true;
590 } 589 }
591 590
592 void HistoryService::SetInMemoryBackend( 591 void HistoryService::SetInMemoryBackend(
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 NotificationService::current()->Notify(type, source, det); 657 NotificationService::current()->Notify(type, source, det);
659 } 658 }
660 659
661 void HistoryService::OnDBLoaded() { 660 void HistoryService::OnDBLoaded() {
662 LOG(INFO) << "History backend finished loading"; 661 LOG(INFO) << "History backend finished loading";
663 backend_loaded_ = true; 662 backend_loaded_ = true;
664 NotificationService::current()->Notify(NotificationType::HISTORY_LOADED, 663 NotificationService::current()->Notify(NotificationType::HISTORY_LOADED,
665 Source<Profile>(profile_), 664 Source<Profile>(profile_),
666 Details<HistoryService>(this)); 665 Details<HistoryService>(this));
667 } 666 }
OLDNEW
« no previous file with comments | « chrome/browser/crash_recovery_uitest.cc ('k') | chrome/browser/history/url_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698