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

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

Issue 2166683003: Componentize spellcheck [1]: create component and move switches there. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + --no-find-copies 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: chrome/browser/spellchecker/feedback_sender.cc
diff --git a/chrome/browser/spellchecker/feedback_sender.cc b/chrome/browser/spellchecker/feedback_sender.cc
index 879358d575b6226396b0cb5257fd0ee08c26cc5c..5c6832b82203fb91863a34021adb172638d235e6 100644
--- a/chrome/browser/spellchecker/feedback_sender.cc
+++ b/chrome/browser/spellchecker/feedback_sender.cc
@@ -45,11 +45,11 @@
#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/data_use_measurement/core/data_use_user_data.h"
+#include "components/spellcheck/common/spellcheck_switches.h"
#include "content/public/browser/render_process_host.h"
#include "crypto/random.h"
#include "crypto/secure_hash.h"
@@ -183,7 +183,7 @@ std::string GetApiVersion() {
if (base::FieldTrialList::FindFullName(kFeedbackFieldTrialName) ==
kFeedbackFieldTrialEnabledGroupName &&
base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableSpellingFeedbackFieldTrial)) {
+ spellcheck::switches::kEnableSpellingFeedbackFieldTrial)) {
return "v2-internal";
}
return "v2";
@@ -206,10 +206,10 @@ FeedbackSender::FeedbackSender(net::URLRequestContextGetter* request_context,
// TODO(rouslan): Remove the command-line switch when testing is complete.
// http://crbug.com/247726
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kSpellingServiceFeedbackUrl)) {
+ spellcheck::switches::kSpellingServiceFeedbackUrl)) {
feedback_service_url_ =
GURL(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kSpellingServiceFeedbackUrl));
+ spellcheck::switches::kSpellingServiceFeedbackUrl));
}
}
@@ -348,10 +348,10 @@ void FeedbackSender::StartFeedbackCollection() {
// TODO(rouslan): Remove the command-line switch when testing is complete.
// http://crbug.com/247726
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kSpellingServiceFeedbackIntervalSeconds)) {
+ spellcheck::switches::kSpellingServiceFeedbackIntervalSeconds)) {
base::StringToInt(
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kSpellingServiceFeedbackIntervalSeconds),
+ spellcheck::switches::kSpellingServiceFeedbackIntervalSeconds),
&interval_seconds);
if (interval_seconds < kMinIntervalSeconds)
interval_seconds = kMinIntervalSeconds;
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/spellchecker/feedback_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698