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

Side by Side Diff: components/update_client/update_query_params.cc

Issue 2898243004: Announce to Omaha that Chrome accepts CRX₂ and CRX₃ files. (Closed)
Patch Set: Through #7 Created 3 years, 6 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 | « components/update_client/protocol_builder.cc ('k') | 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/update_client/update_query_params.h" 5 #include "components/update_client/update_query_params.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "components/update_client/update_query_params_delegate.h" 10 #include "components/update_client/update_query_params_delegate.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 const char kChromiumCrx[] = "chromiumcrx"; 64 const char kChromiumCrx[] = "chromiumcrx";
65 #endif // defined(GOOGLE_CHROME_BUILD) 65 #endif // defined(GOOGLE_CHROME_BUILD)
66 66
67 UpdateQueryParamsDelegate* g_delegate = NULL; 67 UpdateQueryParamsDelegate* g_delegate = NULL;
68 68
69 } // namespace 69 } // namespace
70 70
71 // static 71 // static
72 std::string UpdateQueryParams::Get(ProdId prod) { 72 std::string UpdateQueryParams::Get(ProdId prod) {
73 return base::StringPrintf( 73 return base::StringPrintf(
74 "os=%s&arch=%s&nacl_arch=%s&prod=%s%s", kOs, kArch, GetNaclArch(), 74 "os=%s&arch=%s&nacl_arch=%s&prod=%s%s&acceptformat=crx2,crx3", kOs, kArch,
75 GetProdIdString(prod), 75 GetNaclArch(), GetProdIdString(prod),
76 g_delegate ? g_delegate->GetExtraParams().c_str() : ""); 76 g_delegate ? g_delegate->GetExtraParams().c_str() : "");
77 } 77 }
78 78
79 // static 79 // static
80 const char* UpdateQueryParams::GetProdIdString(UpdateQueryParams::ProdId prod) { 80 const char* UpdateQueryParams::GetProdIdString(UpdateQueryParams::ProdId prod) {
81 switch (prod) { 81 switch (prod) {
82 case UpdateQueryParams::CHROME: 82 case UpdateQueryParams::CHROME:
83 return kChrome; 83 return kChrome;
84 break; 84 break;
85 case UpdateQueryParams::CRX: 85 case UpdateQueryParams::CRX:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 return version_info::GetVersionNumber(); 135 return version_info::GetVersionNumber();
136 } 136 }
137 137
138 // static 138 // static
139 void UpdateQueryParams::SetDelegate(UpdateQueryParamsDelegate* delegate) { 139 void UpdateQueryParams::SetDelegate(UpdateQueryParamsDelegate* delegate) {
140 DCHECK(!g_delegate || !delegate || (delegate == g_delegate)); 140 DCHECK(!g_delegate || !delegate || (delegate == g_delegate));
141 g_delegate = delegate; 141 g_delegate = delegate;
142 } 142 }
143 143
144 } // namespace update_client 144 } // namespace update_client
OLDNEW
« no previous file with comments | « components/update_client/protocol_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698