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

Unified Diff: components/spellcheck/browser/feedback_sender.cc

Issue 2159283003: [WIP][DO NOT LAND] Componentize spellcheck Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: components/spellcheck/browser/feedback_sender.cc
diff --git a/chrome/browser/spellchecker/feedback_sender.cc b/components/spellcheck/browser/feedback_sender.cc
similarity index 96%
rename from chrome/browser/spellchecker/feedback_sender.cc
rename to components/spellcheck/browser/feedback_sender.cc
index 879358d575b6226396b0cb5257fd0ee08c26cc5c..95f2b88a815da7738b37e3d6db2c5dd02125d242 100644
--- a/chrome/browser/spellchecker/feedback_sender.cc
+++ b/components/spellcheck/browser/feedback_sender.cc
@@ -27,7 +27,7 @@
// displayed to the user and sends the current state of user feedback to the
// spelling service.
-#include "chrome/browser/spellchecker/feedback_sender.h"
+#include "components/spellcheck/browser/feedback_sender.h"
#include <algorithm>
#include <iterator>
@@ -44,11 +44,11 @@
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/values.h"
-#include "chrome/browser/spellchecker/word_trimmer.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/spellcheck_common.h"
-#include "chrome/common/spellcheck_marker.h"
-#include "chrome/common/spellcheck_messages.h"
+#include "components/spellcheck/browser/word_trimmer.h"
+#include "content/public/common/content_switches.h"
+#include "components/spellcheck/common/spellcheck_common.h"
+#include "components/spellcheck/common/spellcheck_marker.h"
+#include "components/spellcheck/common/spellcheck_messages.h"
#include "components/data_use_measurement/core/data_use_user_data.h"
#include "content/public/browser/render_process_host.h"
#include "crypto/random.h"
@@ -102,7 +102,7 @@ Misspelling BuildFeedback(const SpellCheckResult& result,
base::string16 context = TrimWords(&start,
start + result.length,
text,
- chrome::spellcheck_common::kContextWordCount);
+ spellcheck_common::kContextWordCount);
return Misspelling(context,
start,
result.length,
@@ -281,7 +281,7 @@ void FeedbackSender::OnReceiveDocumentMarkers(
int renderer_process_id,
const std::vector<uint32_t>& markers) {
if ((base::Time::Now() - session_start_).InHours() >=
- chrome::spellcheck_common::kSessionHours) {
+ spellcheck_common::kSessionHours) {
FlushFeedback();
return;
}
@@ -343,7 +343,7 @@ void FeedbackSender::StartFeedbackCollection() {
if (timer_.IsRunning())
return;
- int interval_seconds = chrome::spellcheck_common::kFeedbackIntervalSeconds;
+ int interval_seconds = spellcheck_common::kFeedbackIntervalSeconds;
// This command-line switch is for testing and temporary.
// TODO(rouslan): Remove the command-line switch when testing is complete.
// http://crbug.com/247726
@@ -356,7 +356,7 @@ void FeedbackSender::StartFeedbackCollection() {
if (interval_seconds < kMinIntervalSeconds)
interval_seconds = kMinIntervalSeconds;
static const int kSessionSeconds =
- chrome::spellcheck_common::kSessionHours * 60 * 60;
+ spellcheck_common::kSessionHours * 60 * 60;
if (interval_seconds > kSessionSeconds)
interval_seconds = kSessionSeconds;
}
« no previous file with comments | « components/spellcheck/browser/feedback_sender.h ('k') | components/spellcheck/browser/feedback_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698