| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |