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
3 // found in the LICENSE file.
5 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h"
7 #include "base/lazy_instance.h"
8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/browser_process.h"
10 #include "chrome/common/channel_info.h"
11 #include "components/version_info/version_info.h"
15 base::LazyInstance
<ChromeUpdateQueryParamsDelegate
> g_delegate
=
16 LAZY_INSTANCE_INITIALIZER
;
20 ChromeUpdateQueryParamsDelegate::ChromeUpdateQueryParamsDelegate() {
23 ChromeUpdateQueryParamsDelegate::~ChromeUpdateQueryParamsDelegate() {
27 ChromeUpdateQueryParamsDelegate
*
28 ChromeUpdateQueryParamsDelegate::GetInstance() {
29 return g_delegate
.Pointer();
32 std::string
ChromeUpdateQueryParamsDelegate::GetExtraParams() {
33 return base::StringPrintf("&prodchannel=%s&prodversion=%s&lang=%s",
34 chrome::GetChannelString().c_str(),
35 version_info::GetVersionNumber().c_str(),
40 const char* ChromeUpdateQueryParamsDelegate::GetLang() {
41 return g_browser_process
->GetApplicationLocale().c_str();