| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/renderer_host/translation_service.h" | 5 #include "chrome/browser/renderer_host/translation_service.h" |
| 6 | 6 |
| 7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
| 9 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profile.h" |
| 10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
| 11 #include "net/base/escape.h" | 11 #include "net/base/escape.h" |
| 12 | 12 |
| 13 #if defined(GOOGLE_CHROME_BUILD) | 13 #if 1 || defined(GOOGLE_CHROME_BUILD) |
| 14 #include "chrome/browser/renderer_host/translate/translate_internal.h" | 14 #include "chrome/browser/renderer_host/translate/translate_internal.h" |
| 15 #else | 15 #else |
| 16 // Defining dummy URLs for unit-tests to pass. | 16 // Defining dummy URLs for unit-tests to pass. |
| 17 #define TRANSLATE_SERVER_URL "http://disabled" | 17 #define TRANSLATE_SERVER_URL "http://disabled" |
| 18 #define TRANSLATE_SERVER_SECURE_URL "https://disabled" | 18 #define TRANSLATE_SERVER_SECURE_URL "https://disabled" |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 // The URLs we send translation requests to. | 23 // The URLs we send translation requests to. |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 request->append("=1"); | 656 request->append("=1"); |
| 657 } | 657 } |
| 658 } | 658 } |
| 659 // IMPORTANT NOTE: if you make any change below, make sure to reflect them in | 659 // IMPORTANT NOTE: if you make any change below, make sure to reflect them in |
| 660 // text_param_length_ in TranslationService constructor. | 660 // text_param_length_ in TranslationService constructor. |
| 661 request->append("&"); | 661 request->append("&"); |
| 662 request->append(kTextParam); | 662 request->append(kTextParam); |
| 663 request->append("="); | 663 request->append("="); |
| 664 request->append(text); | 664 request->append(text); |
| 665 } | 665 } |
| OLD | NEW |