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

Side by Side Diff: components/update_client/update_query_params_delegate.h

Issue 1281913002: Componentize ComponentUpdaterConfigurator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix iOS compile Created 5 years, 4 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
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 #ifndef COMPONENTS_UPDATE_CLIENT_UPDATE_QUERY_PARAMS_DELEGATE_H_ 5 #ifndef COMPONENTS_UPDATE_CLIENT_UPDATE_QUERY_PARAMS_DELEGATE_H_
6 #define COMPONENTS_UPDATE_CLIENT_UPDATE_QUERY_PARAMS_DELEGATE_H_ 6 #define COMPONENTS_UPDATE_CLIENT_UPDATE_QUERY_PARAMS_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "components/version_info/version_info.h"
11 12
12 namespace update_client { 13 namespace update_client {
13 14
14 // Embedders can specify an UpdateQueryParamsDelegate to provide additional 15 // Embedders can specify an UpdateQueryParamsDelegate to provide additional
15 // custom parameters. If not specified (Set is never called), no additional 16 // custom parameters. If not specified (Set is never called), no additional
16 // parameters are added. 17 // parameters are added.
17 class UpdateQueryParamsDelegate { 18 class UpdateQueryParamsDelegate {
18 public: 19 public:
19 UpdateQueryParamsDelegate(); 20 UpdateQueryParamsDelegate();
20 virtual ~UpdateQueryParamsDelegate(); 21 virtual ~UpdateQueryParamsDelegate();
21 22
22 // Returns additional parameters, if any. If there are any parameters, the 23 // Returns additional parameters, if any. If there are any parameters, the
23 // string should begin with a & character. 24 // string should begin with a & character.
24 virtual std::string GetExtraParams() = 0; 25 virtual std::string GetExtraParams() = 0;
25 26
27 // Returns the value we use for the "updaterchannel=" and "prodchannel="
Sorin Jianu 2015/08/12 02:27:51 This addition is suboptimal. UpdateQueryParamsDele
droger 2015/08/12 08:43:41 I can move this function elsewhere if you prefer.
Sorin Jianu 2015/08/12 17:16:55 Free function would be better imho.
droger 2015/08/13 11:27:35 I moved the function to UpdateQueryParams, it seem
28 // parameters. Possible return values include: "canary", "dev", "beta", and
29 // "stable".
30 static const char* GetChannelStringHelper(version_info::Channel channel);
31
26 private: 32 private:
27 DISALLOW_COPY_AND_ASSIGN(UpdateQueryParamsDelegate); 33 DISALLOW_COPY_AND_ASSIGN(UpdateQueryParamsDelegate);
28 }; 34 };
29 35
30 } // namespace update_client 36 } // namespace update_client
31 37
32 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_QUERY_PARAMS_DELEGATE_H_ 38 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_QUERY_PARAMS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698