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

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

Issue 12418: Implement History as HTML and add/change a bunch of stuff to make it easier t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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/dom_ui/new_tab_ui.cc ('k') | chrome/browser/native_ui_contents.h » ('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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 Task* task) { 562 Task* task) {
563 // FIXME(brettw) do prioritization. 563 // FIXME(brettw) do prioritization.
564 thread_->message_loop()->PostTask(FROM_HERE, task); 564 thread_->message_loop()->PostTask(FROM_HERE, task);
565 } 565 }
566 566
567 bool HistoryService::CanAddURL(const GURL& url) const { 567 bool HistoryService::CanAddURL(const GURL& url) const {
568 if (!url.is_valid()) 568 if (!url.is_valid())
569 return false; 569 return false;
570 570
571 if (url.SchemeIs("javascript") || 571 if (url.SchemeIs("javascript") ||
572 url.SchemeIs("chrome-resource") || 572 url.SchemeIs("chrome") ||
573 url.SchemeIs("view-source")) 573 url.SchemeIs("view-source"))
574 return false; 574 return false;
575 575
576 if (url.SchemeIs("about")) { 576 if (url.SchemeIs("about")) {
577 std::string path = url.path(); 577 std::string path = url.path();
578 if (path.empty() || LowerCaseEqualsASCII(path, "blank")) 578 if (path.empty() || LowerCaseEqualsASCII(path, "blank"))
579 return false; 579 return false;
580 // We allow all other about URLs since the user may like to see things 580 // We allow all other about URLs since the user may like to see things
581 // like "about:memory" or "about:histograms" in their history and 581 // like "about:memory" or "about:histograms" in their history and
582 // autocomplete. 582 // autocomplete.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 NotificationService::current()->Notify(type, source, det); 649 NotificationService::current()->Notify(type, source, det);
650 } 650 }
651 651
652 void HistoryService::OnDBLoaded() { 652 void HistoryService::OnDBLoaded() {
653 LOG(INFO) << "History backend finished loading"; 653 LOG(INFO) << "History backend finished loading";
654 backend_loaded_ = true; 654 backend_loaded_ = true;
655 NotificationService::current()->Notify(NOTIFY_HISTORY_LOADED, 655 NotificationService::current()->Notify(NOTIFY_HISTORY_LOADED,
656 Source<Profile>(profile_), 656 Source<Profile>(profile_),
657 Details<HistoryService>(this)); 657 Details<HistoryService>(this));
658 } 658 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.cc ('k') | chrome/browser/native_ui_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698