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

Side by Side Diff: chrome/browser/renderer_host/translation_service.cc

Issue 594056: Translate Infobars for OS X. (Closed)
Patch Set: Fix review comments Created 10 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/translate_infobar.mm ('k') | chrome/browser/translate/translate_infobars_delegates.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698