| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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. |
| 4 |
| 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_OMAHA_OMAHA_SERVICE_PROVIDER_H_ |
| 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_OMAHA_OMAHA_SERVICE_PROVIDER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "url/gurl.h" |
| 12 |
| 13 class OmahaXmlWriter; |
| 14 |
| 15 // OmahaServiceProvider provides the OmahaService with URLs and other data that |
| 16 // are necessary to send update requests. |
| 17 class OmahaServiceProvider { |
| 18 public: |
| 19 OmahaServiceProvider(); |
| 20 virtual ~OmahaServiceProvider(); |
| 21 |
| 22 // Returns the URL to use for update checks. |
| 23 virtual GURL GetUpdateServerURL() const; |
| 24 |
| 25 // Returns the unique ID for this application. The returned value may depend |
| 26 // on bundle id, channel, or form factor. |
| 27 virtual std::string GetApplicationID() const; |
| 28 |
| 29 // Returns the default brand code for this installation. The returned value |
| 30 // may depend on bundle id, channel, or form factor. Returns the empty string |
| 31 // if this installation is not associated with a brand code. |
| 32 virtual std::string GetBrandCode() const; |
| 33 |
| 34 // Allows the embedder to append embedder-specific attributes to the XML |
| 35 // request. This method may be called multiple times per request. Embedders |
| 36 // should only add attributes that are relevant for the given element |tag|. |
| 37 virtual void AppendExtraAttributes(const std::string& tag, |
| 38 OmahaXmlWriter* writer) const; |
| 39 |
| 40 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(OmahaServiceProvider); |
| 42 }; |
| 43 |
| 44 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_OMAHA_OMAHA_SERVICE_PROVIDER_H_ |
| OLD | NEW |