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

Unified Diff: third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp

Issue 2827903002: Hide cold mode idle time spellchecker behind a flag (Closed)
Patch Set: Created 3 years, 8 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: third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp b/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp
index b28309ebeed9352f91ee3aba4504281b2222d1f1..41211b259bc2165bbe308c0610578816aa8d4a08 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp
@@ -103,7 +103,8 @@ void IdleSpellCheckCallback::SetNeedsInvocation() {
}
void IdleSpellCheckCallback::SetNeedsColdModeInvocation() {
- if (!IsSpellCheckingEnabled()) {
+ if (!RuntimeEnabledFeatures::idleTimeColdModeSpellCheckingEnabled() ||
+ !IsSpellCheckingEnabled()) {
Deactivate();
return;
}
@@ -121,6 +122,7 @@ void IdleSpellCheckCallback::SetNeedsColdModeInvocation() {
}
void IdleSpellCheckCallback::ColdModeTimerFired(TimerBase*) {
+ DCHECK(RuntimeEnabledFeatures::idleTimeColdModeSpellCheckingEnabled());
DCHECK_EQ(State::kColdModeTimerStarted, state_);
if (!IsSpellCheckingEnabled()) {
@@ -174,6 +176,7 @@ void IdleSpellCheckCallback::handleEvent(IdleDeadline* deadline) {
HotModeInvocation(deadline);
SetNeedsColdModeInvocation();
} else if (state_ == State::kColdModeRequested) {
+ DCHECK(RuntimeEnabledFeatures::idleTimeColdModeSpellCheckingEnabled());
state_ = State::kInColdModeInvocation;
cold_mode_requester_->Invoke(deadline);
if (cold_mode_requester_->FullDocumentChecked())

Powered by Google App Engine
This is Rietveld 408576698