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

Side by Side Diff: chrome/common/libxml_utils.cc

Issue 384103: This patch is the rest of the lint cleanup minus the other open issue. (Closed)
Patch Set: Created 11 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
« no previous file with comments | « chrome/common/json_value_serializer.h ('k') | chrome/common/logging_chrome.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/common/libxml_utils.h" 5 #include "chrome/common/libxml_utils.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // Skip all other node types. 110 // Skip all other node types.
111 continue; 111 continue;
112 } 112 }
113 } while (Read()); 113 } while (Read());
114 return false; 114 return false;
115 } 115 }
116 116
117 117
118 // XmlWriter functions 118 // XmlWriter functions
119 119
120 XmlWriter::XmlWriter() : 120 XmlWriter::XmlWriter()
121 writer_(NULL), 121 : writer_(NULL),
122 buffer_(NULL) {} 122 buffer_(NULL) {}
123 123
124 XmlWriter::~XmlWriter() { 124 XmlWriter::~XmlWriter() {
125 if (writer_) 125 if (writer_)
126 xmlFreeTextWriter(writer_); 126 xmlFreeTextWriter(writer_);
127 if (buffer_) 127 if (buffer_)
128 xmlBufferFree(buffer_); 128 xmlBufferFree(buffer_);
129 } 129 }
130 130
131 void XmlWriter::StartWriting() { 131 void XmlWriter::StartWriting() {
132 buffer_ = xmlBufferCreate(); 132 buffer_ = xmlBufferCreate();
133 writer_ = xmlNewTextWriterMemory(buffer_, 0); 133 writer_ = xmlNewTextWriterMemory(buffer_, 0);
134 xmlTextWriterSetIndent(writer_, 1); 134 xmlTextWriterSetIndent(writer_, 1);
135 xmlTextWriterStartDocument(writer_, NULL, NULL, NULL); 135 xmlTextWriterStartDocument(writer_, NULL, NULL, NULL);
136 } 136 }
137 137
138 void XmlWriter::StopWriting() { 138 void XmlWriter::StopWriting() {
139 xmlTextWriterEndDocument(writer_); 139 xmlTextWriterEndDocument(writer_);
140 xmlFreeTextWriter(writer_); 140 xmlFreeTextWriter(writer_);
141 writer_ = NULL; 141 writer_ = NULL;
142 } 142 }
OLDNEW
« no previous file with comments | « chrome/common/json_value_serializer.h ('k') | chrome/common/logging_chrome.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698