OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/spellchecker/spelling_service_client.h" | 5 #include "chrome/browser/spellchecker/spelling_service_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/json/string_escape.h" | 9 #include "base/json/string_escape.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/metrics/field_trial.h" | 11 #include "base/metrics/field_trial.h" |
| 12 #include "base/prefs/pref_service.h" |
12 #include "base/string_util.h" | 13 #include "base/string_util.h" |
13 #include "base/stringprintf.h" | 14 #include "base/stringprintf.h" |
14 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
15 #include "base/values.h" | 16 #include "base/values.h" |
16 #include "chrome/browser/prefs/pref_service.h" | |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
19 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
20 #include "chrome/common/spellcheck_result.h" | 20 #include "chrome/common/spellcheck_result.h" |
21 #include "google_apis/google_api_keys.h" | 21 #include "google_apis/google_api_keys.h" |
22 #include "net/base/load_flags.h" | 22 #include "net/base/load_flags.h" |
23 #include "net/url_request/url_fetcher.h" | 23 #include "net/url_request/url_fetcher.h" |
24 #include "third_party/icu/public/common/unicode/uloc.h" | 24 #include "third_party/icu/public/common/unicode/uloc.h" |
25 | 25 |
26 // Use the public URL to the Spelling service on Chromium. | 26 // Use the public URL to the Spelling service on Chromium. |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 if (!suggestions->GetDictionary(0, &suggestion) || | 237 if (!suggestions->GetDictionary(0, &suggestion) || |
238 !suggestion->GetString("suggestion", &replacement)) { | 238 !suggestion->GetString("suggestion", &replacement)) { |
239 return false; | 239 return false; |
240 } | 240 } |
241 SpellCheckResult result( | 241 SpellCheckResult result( |
242 SpellCheckResult::SPELLING, start, length, replacement); | 242 SpellCheckResult::SPELLING, start, length, replacement); |
243 results->push_back(result); | 243 results->push_back(result); |
244 } | 244 } |
245 return true; | 245 return true; |
246 } | 246 } |
OLD | NEW |