Commit 72308c8f authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Remove dead code in PrivetLocalPrintOperationImpl.

Change-Id: Ib22c9ebe468065a572cf3d5a2ba61cbd3ed85698
Reviewed-on: https://chromium-review.googlesource.com/804752Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521441}
parent 9960c154
......@@ -168,9 +168,6 @@ class PrivetLocalPrintOperation {
// Username and jobname are for display only.
virtual void SetUsername(const std::string& username) = 0;
virtual void SetJobname(const std::string& jobname) = 0;
// If |offline| is true, we will indicate to the printer not to post the job
// to Google Cloud Print.
virtual void SetOffline(bool offline) = 0;
// Document page size.
virtual void SetPageSize(const gfx::Size& page_size) = 0;
......
......@@ -50,8 +50,6 @@ const int kPrivetCancelationTimeoutSeconds = 3;
const char kPrivetURLKeyUserName[] = "user_name";
const char kPrivetURLKeyClientName[] = "client_name";
const char kPrivetURLKeyJobname[] = "job_name";
const char kPrivetURLKeyOffline[] = "offline";
const char kPrivetURLValueOffline[] = "1";
const char kPrivetURLValueClientName[] = "Chrome";
const char kPrivetContentTypePDF[] = "application/pdf";
......@@ -388,7 +386,6 @@ PrivetLocalPrintOperationImpl::PrivetLocalPrintOperationImpl(
use_pdf_(false),
has_extended_workflow_(false),
started_(false),
offline_(false),
invalid_job_retries_(0),
weak_factory_(this) {
}
......@@ -501,12 +498,6 @@ void PrivetLocalPrintOperationImpl::DoSubmitdoc() {
jobid_);
}
if (offline_) {
url = net::AppendQueryParameter(url,
kPrivetURLKeyOffline,
kPrivetURLValueOffline);
}
url_fetcher_ =
privet_client_->CreateURLFetcher(url, net::URLFetcher::POST, this);
......@@ -667,11 +658,6 @@ void PrivetLocalPrintOperationImpl::SetJobname(const std::string& jobname) {
jobname_ = jobname;
}
void PrivetLocalPrintOperationImpl::SetOffline(bool offline) {
DCHECK(!started_);
offline_ = offline;
}
void PrivetLocalPrintOperationImpl::SetPageSize(const gfx::Size& page_size) {
DCHECK(!started_);
page_size_ = page_size;
......
......@@ -156,30 +156,22 @@ class PrivetLocalPrintOperationImpl
public:
PrivetLocalPrintOperationImpl(PrivetHTTPClient* privet_client,
PrivetLocalPrintOperation::Delegate* delegate);
~PrivetLocalPrintOperationImpl() override;
void Start() override;
// PrivetLocalPrintOperation:
void Start() override;
void SetData(const scoped_refptr<base::RefCountedBytes>& data) override;
void SetCapabilities(const std::string& capabilities) override;
void SetTicket(const std::string& ticket) override;
void SetUsername(const std::string& user) override;
void SetJobname(const std::string& jobname) override;
void SetOffline(bool offline) override;
void SetPageSize(const gfx::Size& page_size) override;
void SetPWGRasterConverterForTesting(
std::unique_ptr<printing::PWGRasterConverter> pwg_raster_converter)
override;
PrivetHTTPClient* GetHTTPClient() override;
// PrivetURLFetcher::Delegate:
void OnError(PrivetURLFetcher* fetcher,
PrivetURLFetcher::ErrorType error) override;
void OnParsedJson(PrivetURLFetcher* fetcher,
......@@ -221,7 +213,6 @@ class PrivetLocalPrintOperationImpl
bool use_pdf_;
bool has_extended_workflow_;
bool started_;
bool offline_;
gfx::Size page_size_;
std::string user_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment