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

Unified Diff: chrome/browser/spellchecker/feedback_sender.h

Issue 26558006: [spell] Remove spelling service feedback from behind the flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Correct number of seconds Created 7 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 | « chrome/browser/about_flags.cc ('k') | chrome/browser/spellchecker/feedback_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/spellchecker/feedback_sender.h
diff --git a/chrome/browser/spellchecker/feedback_sender.h b/chrome/browser/spellchecker/feedback_sender.h
index ea647ad5392e9837b284faf6c51ac62bd674c9d3..1ec5f3f3a61ddc441ba4100c15b9d3025630d49e 100644
--- a/chrome/browser/spellchecker/feedback_sender.h
+++ b/chrome/browser/spellchecker/feedback_sender.h
@@ -103,6 +103,13 @@ class FeedbackSender : public base::SupportsWeakPtr<FeedbackSender>,
void OnLanguageCountryChange(const std::string& language,
const std::string& country);
+ // Starts collecting feedback, if it's not already being collected.
+ void StartFeedbackCollection();
+
+ // Sends out all previously collected data and stops collecting feedback, if
+ // it was being collected.
+ void StopFeedbackCollection();
+
private:
friend class FeedbackSenderTest;
@@ -125,6 +132,9 @@ class FeedbackSender : public base::SupportsWeakPtr<FeedbackSender>,
// URL request context for the feedback senders.
scoped_refptr<net::URLRequestContextGetter> request_context_;
+ // The feedback API version.
+ const std::string api_version_;
+
// The language of text. The string is a BCP 47 language tag.
std::string language_;
@@ -149,8 +159,9 @@ class FeedbackSender : public base::SupportsWeakPtr<FeedbackSender>,
GURL feedback_service_url_;
// A timer to periodically request a list of document spelling markers from
- // all of the renderers. The timer runs while an instance of this class is
- // alive.
+ // all of the renderers. The timer starts in StartFeedbackCollection() and
+ // stops in StopFeedbackCollection(). The timer stops and abandons its tasks
+ // on destruction.
base::RepeatingTimer<FeedbackSender> timer_;
// Feedback senders that need to stay alive for the duration of sending data.
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/spellchecker/feedback_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698