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" | |
8 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
9 #include "base/json/string_escape.h" | 8 #include "base/json/string_escape.h" |
10 #include "base/logging.h" | 9 #include "base/logging.h" |
11 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
12 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
13 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
14 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
15 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
16 #include "base/values.h" | 15 #include "base/values.h" |
17 #include "chrome/common/chrome_switches.h" | |
18 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
19 #include "chrome/common/spellcheck_common.h" | 17 #include "chrome/common/spellcheck_common.h" |
20 #include "chrome/common/spellcheck_result.h" | 18 #include "chrome/common/spellcheck_result.h" |
21 #include "components/user_prefs/user_prefs.h" | 19 #include "components/user_prefs/user_prefs.h" |
22 #include "content/public/browser/browser_context.h" | 20 #include "content/public/browser/browser_context.h" |
23 #include "google_apis/google_api_keys.h" | 21 #include "google_apis/google_api_keys.h" |
24 #include "net/base/load_flags.h" | 22 #include "net/base/load_flags.h" |
25 #include "net/url_request/url_fetcher.h" | 23 #include "net/url_request/url_fetcher.h" |
26 #include "url/gurl.h" | 24 #include "url/gurl.h" |
27 | 25 |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 spellcheck_fetchers_.erase(fetcher.get()); | 249 spellcheck_fetchers_.erase(fetcher.get()); |
252 | 250 |
253 // The callback may release the last (transitive) dependency on |this|. It | 251 // The callback may release the last (transitive) dependency on |this|. It |
254 // MUST be the last function called. | 252 // MUST be the last function called. |
255 callback_data->callback.Run(success, callback_data->text, results); | 253 callback_data->callback.Run(success, callback_data->text, results); |
256 } | 254 } |
257 | 255 |
258 net::URLFetcher* SpellingServiceClient::CreateURLFetcher(const GURL& url) { | 256 net::URLFetcher* SpellingServiceClient::CreateURLFetcher(const GURL& url) { |
259 return net::URLFetcher::Create(url, net::URLFetcher::POST, this); | 257 return net::URLFetcher::Create(url, net::URLFetcher::POST, this); |
260 } | 258 } |
OLD | NEW |