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

Side by Side Diff: ios/public/provider/chrome/browser/omaha/omaha_xml_writer.h

Issue 2482173002: [ios] Adds OmahaServiceProvider. (Closed)
Patch Set: XML Created 4 years, 1 month 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
(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_XML_WRITER_H_
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_OMAHA_OMAHA_XML_WRITER_H_
7
8 // OmahaXmlWriter is a helper class to generate XML for the Omaha request.
9 class OmahaXmlWriter {
10 public:
11 OmahaXmlWriter() = default;
12 virtual ~OmahaXmlWriter() = default;
13
14 // Starts a new element with the given |name|.
15 virtual void StartElement(const char* name) = 0;
16
17 // Ends the current element.
18 virtual void EndElement() = 0;
19
20 // Writes an attribute with the given |name| and |value| to the current
21 // element.
22 virtual void WriteAttribute(const char* name, const char* value) = 0;
23
24 // Finalizes the XML document. Calling StartElement(), EndElement(), or
25 // WriteAttribute() will have no effect after calling this method.
26 virtual void Finalize() = 0;
27
28 // Returns the generated XML. This method should only be called after
29 // Finalize().
30 virtual std::string GetContentAsString() = 0;
31
32 private:
33 DISALLOW_COPY_AND_ASSIGN(OmahaXmlWriter);
34 };
35
36 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_OMAHA_OMAHA_XML_WRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698