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

Side by Side Diff: chrome/renderer/chrome_render_view_observer.cc

Issue 16951015: Remove TextDatabase from the history service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replace_fts
Patch Set: Sync and rebase. 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
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 #include "chrome/renderer/chrome_render_view_observer.h" 5 #include "chrome/renderer/chrome_render_view_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 // so these will trigger a reindex. 734 // so these will trigger a reindex.
735 GURL stripped_url(StripRef(url)); 735 GURL stripped_url(StripRef(url));
736 if (same_page_id && stripped_url == last_indexed_url_) 736 if (same_page_id && stripped_url == last_indexed_url_)
737 return; 737 return;
738 738
739 if (!preliminary_capture) 739 if (!preliminary_capture)
740 last_indexed_url_ = stripped_url; 740 last_indexed_url_ = stripped_url;
741 741
742 TRACE_EVENT0("renderer", "ChromeRenderViewObserver::CapturePageInfo"); 742 TRACE_EVENT0("renderer", "ChromeRenderViewObserver::CapturePageInfo");
743 743
744 if (contents.size()) {
745 // Send the text to the browser for indexing (the browser might decide not
746 // to index, if the URL is HTTPS for instance).
747 Send(new ChromeViewHostMsg_PageContents(routing_id(), url, page_id,
748 contents));
749 }
750
751 #if defined(FULL_SAFE_BROWSING) 744 #if defined(FULL_SAFE_BROWSING)
752 // Will swap out the string. 745 // Will swap out the string.
753 if (phishing_classifier_) 746 if (phishing_classifier_)
754 phishing_classifier_->PageCaptured(&contents, preliminary_capture); 747 phishing_classifier_->PageCaptured(&contents, preliminary_capture);
755 #endif 748 #endif
756 } 749 }
757 750
758 void ChromeRenderViewObserver::CaptureText(WebFrame* frame, 751 void ChromeRenderViewObserver::CaptureText(WebFrame* frame,
759 string16* contents) { 752 string16* contents) {
760 contents->clear(); 753 contents->clear();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 WebElement element = node.to<WebElement>(); 822 WebElement element = node.to<WebElement>();
830 if (!element.hasTagName(tag_name)) 823 if (!element.hasTagName(tag_name))
831 continue; 824 continue;
832 WebString value = element.getAttribute(attribute_name); 825 WebString value = element.getAttribute(attribute_name);
833 if (value.isNull() || !LowerCaseEqualsASCII(value, "refresh")) 826 if (value.isNull() || !LowerCaseEqualsASCII(value, "refresh"))
834 continue; 827 continue;
835 return true; 828 return true;
836 } 829 }
837 return false; 830 return false;
838 } 831 }
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/test/data/History/url_history_provider_test.db.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698