blob: 74bfee0dcd65c3f614e73e45b8b2a37269d11a98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/update_client/chrome_update_query_params_delegate.h"
#include "base/lazy_instance.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/browser_process.h"
#include "chrome/common/channel_info.h"
#include "components/version_info/version_info.h"
namespace {
base::LazyInstance<ChromeUpdateQueryParamsDelegate> g_delegate =
LAZY_INSTANCE_INITIALIZER;
} // namespace
ChromeUpdateQueryParamsDelegate::ChromeUpdateQueryParamsDelegate() {
}
ChromeUpdateQueryParamsDelegate::~ChromeUpdateQueryParamsDelegate() {
}
// static
ChromeUpdateQueryParamsDelegate*
ChromeUpdateQueryParamsDelegate::GetInstance() {
return g_delegate.Pointer();
}
std::string ChromeUpdateQueryParamsDelegate::GetExtraParams() {
return base::StringPrintf("&prodchannel=%s&prodversion=%s&lang=%s",
chrome::GetChannelString().c_str(),
version_info::GetVersionNumber().c_str(),
GetLang());
}
// static
const char* ChromeUpdateQueryParamsDelegate::GetLang() {
return g_browser_process->GetApplicationLocale().c_str();
}
|