cef/libcef/common/upload_data.cc
Marshall Greenblatt 8078afe7bf Update to Chromium revision 248478.
- Add new CefSettings.windowless_rendering_enabled value that must be enabled when using windowless (off-screen) rendering.
- Improve naming and documentation for CefWindowInfo members.
- CefBeginTracing now completes asynchronously.
- Rename CefEndTracingAsync to CefEndTracing.
- Rename CefCompletionHandler to CefCompletionCallback.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1592 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-02-05 20:35:45 +00:00

38 lines
1.0 KiB
C++

// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cef/libcef/common/upload_data.h"
#include "base/logging.h"
namespace net {
UploadData::UploadData()
: identifier_(0),
is_chunked_(false),
last_chunk_appended_(false) {
}
void UploadData::AppendBytes(const char* bytes, int bytes_len) {
DCHECK(!is_chunked_);
if (bytes_len > 0) {
elements_.push_back(new UploadElement());
elements_.back()->SetToBytes(bytes, bytes_len);
}
}
void UploadData::AppendFileRange(const base::FilePath& file_path,
uint64 offset, uint64 length,
const base::Time& expected_modification_time) {
DCHECK(!is_chunked_);
elements_.push_back(new UploadElement());
elements_.back()->SetToFilePathRange(file_path, offset, length,
expected_modification_time);
}
UploadData::~UploadData() {
}
} // namespace net