buffet: Remove 'chromeos' namespace and move everything to buffet NS
As discussed, moved all the classes out of chromeos namespace into
'buffet.
Also fixed a number of cpplint's warnings.
BUG=None
TEST=Everything still compiles and unit tests succeed.
Change-Id: Ide864acb2504627404966727f66d353af60e531d
Reviewed-on: https://chromium-review.googlesource.com/198971
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/http_utils.cc b/buffet/http_utils.cc
index 9aba6e5..f7f1190 100644
--- a/buffet/http_utils.cc
+++ b/buffet/http_utils.cc
@@ -13,7 +13,7 @@
#include "buffet/mime_utils.h"
#include "buffet/data_encoding.h"
-namespace chromeos {
+namespace buffet {
namespace http {
const char kErrorDomainJSON[] = "json_parser";
@@ -48,7 +48,7 @@
std::shared_ptr<Transport> transport,
ErrorPtr* error) {
if (mime_type == nullptr) {
- mime_type = chromeos::mime::application::kWwwFormUrlEncoded;
+ mime_type = mime::application::kWwwFormUrlEncoded;
}
return PostBinary(url, data, strlen(data), mime_type, headers, transport,
@@ -67,7 +67,7 @@
request.AddHeaders(headers);
if (data_size > 0) {
if (mime_type == nullptr) {
- mime_type = chromeos::mime::application::kOctet_stream;
+ mime_type = mime::application::kOctet_stream;
}
request.SetContentType(mime_type);
if (!request.AddRequestBody(data, data_size, error))
@@ -90,9 +90,9 @@
const HeaderList& headers,
std::shared_ptr<Transport> transport,
ErrorPtr* error) {
- std::string encoded_data = chromeos::data_encoding::WebParamsEncode(data);
+ std::string encoded_data = data_encoding::WebParamsEncode(data);
return PostBinary(url, encoded_data.c_str(), encoded_data.size(),
- chromeos::mime::application::kWwwFormUrlEncoded,
+ mime::application::kWwwFormUrlEncoded,
headers, transport, error);
}
@@ -164,4 +164,4 @@
}
} // namespace http
-} // namespace chromeos
+} // namespace buffet