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

Side by Side Diff: chrome/browser/component_updater/component_updater_configurator.h

Issue 375973003: Componentize component_updater: Use Configurator to build query parameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix one gyp omission Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_CONFIGURATOR_H_ 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_CONFIGURATOR_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_CONFIGURATOR_H_ 6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_CONFIGURATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/version.h"
Sorin Jianu 2014/07/09 08:29:16 A forward decl for base::Version would be sufficie
tommycli 2014/07/09 19:48:10 Done. Had no idea that this was possible. I guess
11
10 class GURL; 12 class GURL;
11 13
12 namespace base { 14 namespace base {
13 class CommandLine; 15 class CommandLine;
14 } 16 }
15 17
16 namespace net { 18 namespace net {
17 class URLRequestContextGetter; 19 class URLRequestContextGetter;
18 } 20 }
19 21
(...skipping 26 matching lines...) Expand all
46 // for the same component. 48 // for the same component.
47 virtual int OnDemandDelay() const = 0; 49 virtual int OnDemandDelay() const = 0;
48 50
49 // The url that is going to be used update checks over Omaha protocol. 51 // The url that is going to be used update checks over Omaha protocol.
50 virtual GURL UpdateUrl() const = 0; 52 virtual GURL UpdateUrl() const = 0;
51 53
52 // The url where the completion pings are sent. Invalid if and only if 54 // The url where the completion pings are sent. Invalid if and only if
53 // pings are disabled. 55 // pings are disabled.
54 virtual GURL PingUrl() const = 0; 56 virtual GURL PingUrl() const = 0;
55 57
58 // Version of the application. Used to compare to component manifests.
59 virtual base::Version ApplicationVersion() const = 0;
60
61 // Parameters added to each url request that specify the current platform.
62 // The return string must be safe for insertion as an attribute in an
63 // XML element.
64 virtual std::string PlatformRequestParams() const = 0;
65
56 // Parameters added to each url request. It can be empty if none are needed. 66 // Parameters added to each url request. It can be empty if none are needed.
57 // The return string must be safe for insertion as an attribute in an 67 // The return string must be safe for insertion as an attribute in an
58 // XML element. 68 // XML element.
59 virtual std::string ExtraRequestParams() const = 0; 69 virtual std::string ExtraRequestParams() const = 0;
60 70
71 // Tag added to the body of each url request. Specifies the platform
72 // name and version. This is a self-closing XML tag.
73 virtual std::string RequestOSTag() const = 0;
74
61 // How big each update request can be. Don't go above 2000. 75 // How big each update request can be. Don't go above 2000.
62 virtual size_t UrlSizeLimit() const = 0; 76 virtual size_t UrlSizeLimit() const = 0;
63 77
64 // The source of contexts for all the url requests. 78 // The source of contexts for all the url requests.
65 virtual net::URLRequestContextGetter* RequestContext() const = 0; 79 virtual net::URLRequestContextGetter* RequestContext() const = 0;
66 80
67 // True means that all ops are performed in this process. 81 // True means that all ops are performed in this process.
68 virtual bool InProcess() const = 0; 82 virtual bool InProcess() const = 0;
69 83
70 // True means that this client can handle delta updates. 84 // True means that this client can handle delta updates.
71 virtual bool DeltasEnabled() const = 0; 85 virtual bool DeltasEnabled() const = 0;
72 86
73 // True means that the background downloader can be used for downloading 87 // True means that the background downloader can be used for downloading
74 // non on-demand components. 88 // non on-demand components.
75 virtual bool UseBackgroundDownloader() const = 0; 89 virtual bool UseBackgroundDownloader() const = 0;
76 }; 90 };
77 91
78 Configurator* MakeChromeComponentUpdaterConfigurator( 92 Configurator* MakeChromeComponentUpdaterConfigurator(
79 const base::CommandLine* cmdline, 93 const base::CommandLine* cmdline,
80 net::URLRequestContextGetter* context_getter); 94 net::URLRequestContextGetter* context_getter);
81 95
82 } // namespace component_updater 96 } // namespace component_updater
83 97
84 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_CONFIGURATOR_H_ 98 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_CONFIGURATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698