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

Unified Diff: android_webview/browser/find_helper.h

Issue 1365563003: Prevent guest views from issuing a search for empty text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: parens Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | android_webview/browser/find_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/find_helper.h
diff --git a/android_webview/browser/find_helper.h b/android_webview/browser/find_helper.h
index 198d94752240ace11c5da7d548cec6dfc7e60077..eb168d0076c31fb17f59012ae6549acd3f20aaa2 100644
--- a/android_webview/browser/find_helper.h
+++ b/android_webview/browser/find_helper.h
@@ -5,7 +5,6 @@
#ifndef ANDROID_WEBVIEW_BROWSER_FIND_HELPER_H_
#define ANDROID_WEBVIEW_BROWSER_FIND_HELPER_H_
-#include "base/memory/weak_ptr.h"
#include "content/public/browser/web_contents_observer.h"
namespace android_webview {
@@ -28,7 +27,7 @@ class FindHelper : public content::WebContentsObserver {
~FindHelper() override;
// Sets the listener to receive find result updates.
- // Does not own the listener and must set to NULL when invalid.
+ // Does not own the listener and must set to nullptr when invalid.
void SetListener(Listener* listener);
// Asynchronous API.
@@ -44,6 +43,7 @@ class FindHelper : public content::WebContentsObserver {
private:
void StartNewRequest(const base::string16& search_string);
+ bool MaybeHandleEmptySearch(const base::string16& search_string);
void NotifyResults(int active_ordinal, int match_count, bool finished);
// Listener results are reported to.
@@ -51,7 +51,6 @@ class FindHelper : public content::WebContentsObserver {
// Used to check the validity of FindNext operations.
bool async_find_started_;
- bool sync_find_started_;
// Used to provide different ids to each request and for result
// verification in asynchronous calls.
@@ -63,9 +62,6 @@ class FindHelper : public content::WebContentsObserver {
int last_match_count_;
int last_active_ordinal_;
- // Used to post synchronous result notifications to ourselves.
- base::WeakPtrFactory<FindHelper> weak_factory_;
-
DISALLOW_COPY_AND_ASSIGN(FindHelper);
};
« no previous file with comments | « no previous file | android_webview/browser/find_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698