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

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

Issue 9368052: Removed WebTextCheckingResult legacy API use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another trial... Created 8 years, 10 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/spelling_service_client.cc
diff --git a/chrome/browser/spellchecker/spelling_service_client.cc b/chrome/browser/spellchecker/spelling_service_client.cc
index 5acf9d2a32185fb2d85b726b56afa92c8c9a3969..49747c7b277fd2c44d54e17c4c7d3a6d197f63e1 100644
--- a/chrome/browser/spellchecker/spelling_service_client.cc
+++ b/chrome/browser/spellchecker/spelling_service_client.cc
@@ -13,9 +13,9 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/spellcheck_result.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/url_fetcher.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCheckingResult.h"
#include "unicode/uloc.h"
#if defined(GOOGLE_CHROME_BUILD)
@@ -103,7 +103,7 @@ void SpellingServiceClient::OnURLFetchComplete(
const content::URLFetcher* source) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
scoped_ptr<content::URLFetcher> clean_up_fetcher(fetcher_.release());
- std::vector<WebKit::WebTextCheckingResult> results;
+ std::vector<SpellCheckResult> results;
if (source->GetResponseCode() / 100 == 2) {
std::string data;
source->GetResponseAsString(&data);
@@ -114,7 +114,7 @@ void SpellingServiceClient::OnURLFetchComplete(
bool SpellingServiceClient::ParseResponse(
const std::string& data,
- std::vector<WebKit::WebTextCheckingResult>* results) {
+ std::vector<SpellCheckResult>* results) {
// When this JSON-RPC call finishes successfully, the Spelling service returns
// an JSON object listed below.
// * result - an envelope object representing the result from the APIARY
@@ -162,7 +162,7 @@ bool SpellingServiceClient::ParseResponse(
for (size_t i = 0; i < misspellings->GetSize(); ++i) {
// Retrieve the i-th misspelling region and put it to the given vector. When
// the Spelling service sends two or more suggestions, we read only the
- // first one because WebTextCheckingResult can store only one suggestion.
+ // first one because SpellCheckResult can store only one suggestion.
DictionaryValue* misspelling = NULL;
if (!misspellings->GetDictionary(i, &misspelling))
return false;
@@ -182,8 +182,8 @@ bool SpellingServiceClient::ParseResponse(
!suggestion->GetString("suggestion", &replacement)) {
return false;
}
- WebKit::WebTextCheckingResult result(
- WebKit::WebTextCheckingTypeSpelling, start, length, replacement);
+ SpellCheckResult result(
+ SpellCheckResult::SPELLING, start, length, replacement);
results->push_back(result);
}
return true;
« no previous file with comments | « chrome/browser/spellchecker/spelling_service_client.h ('k') | chrome/browser/tab_contents/spelling_menu_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698