Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / chrome / browser / update_client / chrome_update_query_params_delegate.cc
blob74bfee0dcd65c3f614e73e45b8b2a37269d11a98
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"
13 namespace {
15 base::LazyInstance<ChromeUpdateQueryParamsDelegate> g_delegate =
16 LAZY_INSTANCE_INITIALIZER;
18 } // namespace
20 ChromeUpdateQueryParamsDelegate::ChromeUpdateQueryParamsDelegate() {
23 ChromeUpdateQueryParamsDelegate::~ChromeUpdateQueryParamsDelegate() {
26 // static
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(),
36 GetLang());
39 // static
40 const char* ChromeUpdateQueryParamsDelegate::GetLang() {
41 return g_browser_process->GetApplicationLocale().c_str();