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

Unified Diff: trunk/src/url/url_canon_stdstring.h

Issue 14264002: Revert 193777 "url: Changes to make it build standalone." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/url/url_canon_relative.cc ('k') | trunk/src/url/url_canon_stdstring.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/url/url_canon_stdstring.h
===================================================================
--- trunk/src/url/url_canon_stdstring.h (revision 194154)
+++ trunk/src/url/url_canon_stdstring.h (working copy)
@@ -31,15 +31,12 @@
// strings. Because the canonicalizer tries not to be dependent on the STL,
// we have segregated it here.
-#ifndef URL_URL_CANON_STDSTRING_H_
-#define URL_URL_CANON_STDSTRING_H_
+#ifndef GOOGLEURL_SRC_URL_CANON_STDSTRING_H__
+#define GOOGLEURL_SRC_URL_CANON_STDSTRING_H__
#include <string>
+#include "googleurl/src/url_canon.h"
-#include "base/compiler_specific.h"
-#include "url/url_canon.h"
-#include "url/url_common.h"
-
namespace url_canon {
// Write into a std::string given in the constructor. This object does not own
@@ -58,7 +55,7 @@
//
// Therefore, the user should call Complete() before using the string that
// this class wrote into.
-class GURL_API StdStringCanonOutput : public CanonOutput {
+class StdStringCanonOutput : public CanonOutput {
public:
StdStringCanonOutput(std::string* str)
: CanonOutput(),
@@ -78,7 +75,11 @@
buffer_len_ = cur_len_;
}
- virtual void Resize(int sz) OVERRIDE;
+ virtual void Resize(int sz) {
+ str_->resize(sz);
+ buffer_ = str_->empty() ? NULL : &(*str_)[0];
+ buffer_len_ = sz;
+ }
protected:
std::string* str_;
@@ -129,4 +130,5 @@
} // namespace url_canon
-#endif // URL_URL_CANON_STDSTRING_H_
+#endif // GOOGLEURL_SRC_URL_CANON_STDSTRING_H__
+
« no previous file with comments | « trunk/src/url/url_canon_relative.cc ('k') | trunk/src/url/url_canon_stdstring.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698