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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
12 #include "base/json/string_escape.h" | 12 #include "base/json/string_escape.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/prefs/pref_service.h" | |
15 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
16 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
17 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
18 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
19 #include "base/values.h" | 18 #include "base/values.h" |
20 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
21 #include "chrome/common/spellcheck_common.h" | 20 #include "chrome/common/spellcheck_common.h" |
22 #include "chrome/common/spellcheck_result.h" | 21 #include "chrome/common/spellcheck_result.h" |
23 #include "components/data_use_measurement/core/data_use_user_data.h" | 22 #include "components/data_use_measurement/core/data_use_user_data.h" |
| 23 #include "components/prefs/pref_service.h" |
24 #include "components/user_prefs/user_prefs.h" | 24 #include "components/user_prefs/user_prefs.h" |
25 #include "content/public/browser/browser_context.h" | 25 #include "content/public/browser/browser_context.h" |
26 #include "google_apis/google_api_keys.h" | 26 #include "google_apis/google_api_keys.h" |
27 #include "net/base/load_flags.h" | 27 #include "net/base/load_flags.h" |
28 #include "net/url_request/url_fetcher.h" | 28 #include "net/url_request/url_fetcher.h" |
29 #include "url/gurl.h" | 29 #include "url/gurl.h" |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // The URL for requesting spell checking and sending user feedback. | 33 // The URL for requesting spell checking and sending user feedback. |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 269 |
270 // The callback may release the last (transitive) dependency on |this|. It | 270 // The callback may release the last (transitive) dependency on |this|. It |
271 // MUST be the last function called. | 271 // MUST be the last function called. |
272 callback_data->callback.Run(success, callback_data->text, results); | 272 callback_data->callback.Run(success, callback_data->text, results); |
273 } | 273 } |
274 | 274 |
275 scoped_ptr<net::URLFetcher> SpellingServiceClient::CreateURLFetcher( | 275 scoped_ptr<net::URLFetcher> SpellingServiceClient::CreateURLFetcher( |
276 const GURL& url) { | 276 const GURL& url) { |
277 return net::URLFetcher::Create(url, net::URLFetcher::POST, this); | 277 return net::URLFetcher::Create(url, net::URLFetcher::POST, this); |
278 } | 278 } |
OLD | NEW |