#include "components/translate/core/browser/translate_script.h"
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/strings/escape.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "components/grit/components_resources.h"
#include "components/translate/core/browser/translate_url_fetcher.h"
#include "components/translate/core/browser/translate_url_util.h"
#include "components/translate/core/common/translate_switches.h"
#include "components/translate/core/common/translate_util.h"
#include "components/variations/variations_associated_data.h"
#include "google_apis/google_api_keys.h"
#include "net/base/url_util.h"
#include "ui/base/resource/resource_bundle.h"
namespace translate {
namespace {
const int kExpirationDelayDays = …;
}
const char TranslateScript::kScriptURL[] = …;
const char TranslateScript::kRequestHeader[] = …;
const char TranslateScript::kAlwaysUseSslQueryName[] = …;
const char TranslateScript::kAlwaysUseSslQueryValue[] = …;
const char TranslateScript::kCallbackQueryName[] = …;
const char TranslateScript::kCallbackQueryValue[] = …;
const char TranslateScript::kCssLoaderCallbackQueryName[] = …;
const char TranslateScript::kCssLoaderCallbackQueryValue[] = …;
const char TranslateScript::kJavascriptLoaderCallbackQueryName[] = …;
const char TranslateScript::kJavascriptLoaderCallbackQueryValue[] = …;
TranslateScript::TranslateScript()
: … { … }
TranslateScript::~TranslateScript() { … }
void TranslateScript::Request(RequestCallback callback, bool is_incognito) { … }
GURL TranslateScript::GetTranslateScriptURL() { … }
void TranslateScript::OnScriptFetchComplete(bool success,
const std::string& data) { … }
}