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

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

Issue 19637009: Revert 212459 "Remove TextDatabase from the history service." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 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 #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
744 #if defined(FULL_SAFE_BROWSING) 751 #if defined(FULL_SAFE_BROWSING)
745 // Will swap out the string. 752 // Will swap out the string.
746 if (phishing_classifier_) 753 if (phishing_classifier_)
747 phishing_classifier_->PageCaptured(&contents, preliminary_capture); 754 phishing_classifier_->PageCaptured(&contents, preliminary_capture);
748 #endif 755 #endif
749 } 756 }
750 757
751 void ChromeRenderViewObserver::CaptureText(WebFrame* frame, 758 void ChromeRenderViewObserver::CaptureText(WebFrame* frame,
752 string16* contents) { 759 string16* contents) {
753 contents->clear(); 760 contents->clear();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 WebElement element = node.to<WebElement>(); 829 WebElement element = node.to<WebElement>();
823 if (!element.hasTagName(tag_name)) 830 if (!element.hasTagName(tag_name))
824 continue; 831 continue;
825 WebString value = element.getAttribute(attribute_name); 832 WebString value = element.getAttribute(attribute_name);
826 if (value.isNull() || !LowerCaseEqualsASCII(value, "refresh")) 833 if (value.isNull() || !LowerCaseEqualsASCII(value, "refresh"))
827 continue; 834 continue;
828 return true; 835 return true;
829 } 836 }
830 return false; 837 return false;
831 } 838 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/common/render_messages.h ('k') | trunk/src/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