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

Side by Side Diff: components/translate/core/browser/translate_script.cc

Issue 2183623002: switch translate element loading domain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/translate/core/browser/translate_script.h" 5 #include "components/translate/core/browser/translate_script.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 16 matching lines...) Expand all
27 27
28 namespace translate { 28 namespace translate {
29 29
30 namespace { 30 namespace {
31 31
32 const int kExpirationDelayDays = 1; 32 const int kExpirationDelayDays = 1;
33 33
34 } // namespace 34 } // namespace
35 35
36 const char TranslateScript::kScriptURL[] = 36 const char TranslateScript::kScriptURL[] =
37 "https://translate.google.com/translate_a/element.js"; 37 "https://translate.googleapis.com/translate_a/element.js";
38 const char TranslateScript::kRequestHeader[] = 38 const char TranslateScript::kRequestHeader[] =
39 "Google-Translate-Element-Mode: library"; 39 "Google-Translate-Element-Mode: library";
40 const char TranslateScript::kAlwaysUseSslQueryName[] = "aus"; 40 const char TranslateScript::kAlwaysUseSslQueryName[] = "aus";
41 const char TranslateScript::kAlwaysUseSslQueryValue[] = "true"; 41 const char TranslateScript::kAlwaysUseSslQueryValue[] = "true";
42 const char TranslateScript::kCallbackQueryName[] = "cb"; 42 const char TranslateScript::kCallbackQueryName[] = "cb";
43 const char TranslateScript::kCallbackQueryValue[] = 43 const char TranslateScript::kCallbackQueryValue[] =
44 "cr.googleTranslate.onTranslateElementLoad"; 44 "cr.googleTranslate.onTranslateElementLoad";
45 const char TranslateScript::kCssLoaderCallbackQueryName[] = "clc"; 45 const char TranslateScript::kCssLoaderCallbackQueryName[] = "clc";
46 const char TranslateScript::kCssLoaderCallbackQueryValue[] = 46 const char TranslateScript::kCssLoaderCallbackQueryValue[] =
47 "cr.googleTranslate.onLoadCSS"; 47 "cr.googleTranslate.onLoadCSS";
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 for (RequestCallbackList::iterator it = callback_list_.begin(); 154 for (RequestCallbackList::iterator it = callback_list_.begin();
155 it != callback_list_.end(); 155 it != callback_list_.end();
156 ++it) { 156 ++it) {
157 it->Run(success, data); 157 it->Run(success, data);
158 } 158 }
159 callback_list_.clear(); 159 callback_list_.clear();
160 } 160 }
161 161
162 } // namespace translate 162 } // namespace translate
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698