diff options
author | vitalybuka <vitalybuka@chromium.org> | 2014-11-05 13:15:12 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-05 21:16:46 +0000 |
commit | e29991c62a63bbce344e597306dab8150c67b532 (patch) | |
tree | 47130312a8e0fa6e2a2469e11470e4d8aae2cddf /chrome/browser/local_discovery | |
parent | 2ee1e3b6643f5ba581ad5411870466a5cf9d7bba (diff) | |
download | chromium_src-e29991c62a63bbce344e597306dab8150c67b532.zip chromium_src-e29991c62a63bbce344e597306dab8150c67b532.tar.gz chromium_src-e29991c62a63bbce344e597306dab8150c67b532.tar.bz2 |
Re-factored printing defines and build configs.
Renamed DISABLE_BASIC_PRINTING to ENABLE_BASIC_PRINTING.
Renamed ENABLE_FULL_PRINTING to ENABLE_PRINT_PREVIEW.
BUG=430281
Review URL: https://codereview.chromium.org/702603004
Cr-Commit-Position: refs/heads/master@{#302868}
Diffstat (limited to 'chrome/browser/local_discovery')
-rw-r--r-- | chrome/browser/local_discovery/privet_http_impl.cc | 16 | ||||
-rw-r--r-- | chrome/browser/local_discovery/privet_http_impl.h | 4 | ||||
-rw-r--r-- | chrome/browser/local_discovery/privet_http_unittest.cc | 12 |
3 files changed, 16 insertions, 16 deletions
diff --git a/chrome/browser/local_discovery/privet_http_impl.cc b/chrome/browser/local_discovery/privet_http_impl.cc index 5f90ba7..68fa5a0 100644 --- a/chrome/browser/local_discovery/privet_http_impl.cc +++ b/chrome/browser/local_discovery/privet_http_impl.cc @@ -21,9 +21,9 @@ #include "ui/gfx/text_elider.h" #include "url/gurl.h" -#if defined(ENABLE_FULL_PRINTING) +#if defined(ENABLE_PRINT_PREVIEW) #include "chrome/browser/local_discovery/pwg_raster_converter.h" -#endif // ENABLE_FULL_PRINTING +#endif // ENABLE_PRINT_PREVIEW using namespace cloud_devices::printer; @@ -40,7 +40,7 @@ const char kPrivetRegisterUserArgName[] = "user"; const int kPrivetCancelationTimeoutSeconds = 3; -#if defined(ENABLE_FULL_PRINTING) +#if defined(ENABLE_PRINT_PREVIEW) const char kPrivetURLKeyUserName[] = "user_name"; const char kPrivetURLKeyClientName[] = "client_name"; const char kPrivetURLKeyJobname[] = "job_name"; @@ -58,7 +58,7 @@ const int kPrivetLocalPrintMaxRetries = 2; const int kPrivetLocalPrintDefaultTimeout = 5; const size_t kPrivetLocalPrintMaxJobNameLength = 64; -#endif // ENABLE_FULL_PRINTING +#endif // ENABLE_PRINT_PREVIEW GURL CreatePrivetURL(const std::string& path) { GURL url(kUrlPlaceHolder); @@ -465,7 +465,7 @@ bool PrivetDataReadOperationImpl::OnRawData(PrivetURLFetcher* fetcher, return true; } -#if defined(ENABLE_FULL_PRINTING) +#if defined(ENABLE_PRINT_PREVIEW) PrivetLocalPrintOperationImpl::PrivetLocalPrintOperationImpl( PrivetHTTPClient* privet_client, PrivetLocalPrintOperation::Delegate* delegate) @@ -825,7 +825,7 @@ void PrivetLocalPrintOperationImpl::SetPWGRasterConverterForTesting( scoped_ptr<PWGRasterConverter> pwg_raster_converter) { pwg_raster_converter_ = pwg_raster_converter.Pass(); } -#endif // ENABLE_FULL_PRINTING +#endif // ENABLE_PRINT_PREVIEW PrivetHTTPClientImpl::PrivetHTTPClientImpl( const std::string& name, @@ -928,12 +928,12 @@ PrivetV1HTTPClientImpl::CreateCapabilitiesOperation( scoped_ptr<PrivetLocalPrintOperation> PrivetV1HTTPClientImpl::CreateLocalPrintOperation( PrivetLocalPrintOperation::Delegate* delegate) { -#if defined(ENABLE_FULL_PRINTING) +#if defined(ENABLE_PRINT_PREVIEW) return scoped_ptr<PrivetLocalPrintOperation>( new PrivetLocalPrintOperationImpl(info_client(), delegate)); #else return scoped_ptr<PrivetLocalPrintOperation>(); -#endif // ENABLE_FULL_PRINTING +#endif // ENABLE_PRINT_PREVIEW } } // namespace local_discovery diff --git a/chrome/browser/local_discovery/privet_http_impl.h b/chrome/browser/local_discovery/privet_http_impl.h index acd13c0..e5d6c3b 100644 --- a/chrome/browser/local_discovery/privet_http_impl.h +++ b/chrome/browser/local_discovery/privet_http_impl.h @@ -195,7 +195,7 @@ class PrivetDataReadOperationImpl : public PrivetDataReadOperation, scoped_ptr<PrivetURLFetcher> url_fetcher_; }; -#if defined(ENABLE_FULL_PRINTING) +#if defined(ENABLE_PRINT_PREVIEW) class PrivetLocalPrintOperationImpl : public PrivetLocalPrintOperation, public PrivetURLFetcher::Delegate { @@ -284,7 +284,7 @@ class PrivetLocalPrintOperationImpl base::WeakPtrFactory<PrivetLocalPrintOperationImpl> weak_factory_; }; -#endif // ENABLE_FULL_PRINTING +#endif // ENABLE_PRINT_PREVIEW class PrivetHTTPClientImpl : public PrivetHTTPClient { public: diff --git a/chrome/browser/local_discovery/privet_http_unittest.cc b/chrome/browser/local_discovery/privet_http_unittest.cc index a3f04af..66bb7f6 100644 --- a/chrome/browser/local_discovery/privet_http_unittest.cc +++ b/chrome/browser/local_discovery/privet_http_unittest.cc @@ -15,9 +15,9 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -#if defined(ENABLE_FULL_PRINTING) +#if defined(ENABLE_PRINT_PREVIEW) #include "chrome/browser/local_discovery/pwg_raster_converter.h" -#endif // ENABLE_FULL_PRINTING +#endif // ENABLE_PRINT_PREVIEW using testing::StrictMock; using testing::NiceMock; @@ -124,7 +124,7 @@ const char kSampleCapabilitiesResponse[] = "{" "}" "}"; -#if defined(ENABLE_FULL_PRINTING) +#if defined(ENABLE_PRINT_PREVIEW) const char kSampleInfoResponseWithCreatejob[] = "{" " \"version\": \"1.0\"," " \"name\": \"Common printer\"," @@ -212,7 +212,7 @@ const char kSampleCJTDuplex[] = "\"version\" : \"1.0\"," "\"print\": { \"duplex\": {\"type\": \"SHORT_EDGE\"} }" "}"; -#endif // ENABLE_FULL_PRINTING +#endif // ENABLE_PRINT_PREVIEW // Return the representation of the given JSON that would be outputted by // JSONWriter. This ensures the same JSON values are represented by the same @@ -752,7 +752,7 @@ TEST_F(PrivetCapabilitiesTest, BadToken) { kSampleCapabilitiesResponse)); } -#if defined(ENABLE_FULL_PRINTING) +#if defined(ENABLE_PRINT_PREVIEW) // A note on PWG raster conversion: The PWG raster converter used simply // converts strings to file paths based on them by appending "test.pdf", since // it's easier to test that way. Instead of using a mock, we simply check if the @@ -1074,7 +1074,7 @@ TEST_F(PrivetLocalPrintTest, LocalPrintRetryOnInvalidJobID) { GURL("http://10.0.0.8:6006/privet/printer/createjob"), kSampleCreatejobResponse)); } -#endif // ENABLE_FULL_PRINTING +#endif // ENABLE_PRINT_PREVIEW } // namespace |