diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 03:32:40 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 03:32:40 +0000 |
commit | cb15406554885da0c1e1030ade25d821b05ddac6 (patch) | |
tree | c7024916ab466deba405168655b3e84f51973be2 /win8 | |
parent | 8c00ed7b6f62fd8db2f0c99446a01f447327878d (diff) | |
download | chromium_src-cb15406554885da0c1e1030ade25d821b05ddac6.zip chromium_src-cb15406554885da0c1e1030ade25d821b05ddac6.tar.gz chromium_src-cb15406554885da0c1e1030ade25d821b05ddac6.tar.bz2 |
Refactor base/safe_numerics.h
* Move into base/numerics subdirectory.
* Rename files for clarity.
* Add owners.
* Rename checked_numeric_cast to checked_cast.
* Fixup callsites and include paths.
BUG=332611
R=brettw@chromium.org, jam@chromium.org
Review URL: https://codereview.chromium.org/141113003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'win8')
-rw-r--r-- | win8/metro_driver/print_document_source.cc | 4 | ||||
-rw-r--r-- | win8/metro_driver/print_handler.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/win8/metro_driver/print_document_source.cc b/win8/metro_driver/print_document_source.cc index 91842b7..34ce227 100644 --- a/win8/metro_driver/print_document_source.cc +++ b/win8/metro_driver/print_document_source.cc @@ -8,7 +8,7 @@ #include <windows.graphics.display.h> #include "base/logging.h" -#include "base/safe_numerics.h" +#include "base/numerics/safe_conversions.h" namespace { @@ -253,7 +253,7 @@ STDMETHODIMP PrintDocumentSource::Paginate(uint32 page, return S_FALSE; hr = dxgi_preview_target_->SetJobPageCount( PageCountType::FinalPageCount, - base::checked_numeric_cast<UINT32>(page_count)); + base::checked_cast<UINT32>(page_count)); if (FAILED(hr)) { LOG(ERROR) << "Failed to SetJobPageCount " << std::hex << hr; return hr; diff --git a/win8/metro_driver/print_handler.cc b/win8/metro_driver/print_handler.cc index 3539c9e..c409fcd 100644 --- a/win8/metro_driver/print_handler.cc +++ b/win8/metro_driver/print_handler.cc @@ -9,7 +9,7 @@ #include "base/bind.h" #include "base/logging.h" -#include "base/safe_numerics.h" +#include "base/numerics/safe_conversions.h" #include "chrome/app/chrome_command_ids.h" #include "win8/metro_driver/chrome_app_view.h" #include "win8/metro_driver/winrt_utils.h" @@ -474,7 +474,7 @@ void MetroSetPrintPageContent(size_t page_number, if (metafile_stream.Get() != NULL) { ULONG bytes_written = 0; hr = metafile_stream->Write(data, - base::checked_numeric_cast<ULONG>(data_size), + base::checked_cast<ULONG>(data_size), &bytes_written); LOG_IF(ERROR, FAILED(hr)) << "Failed to Write to Stream " << std::hex << hr; DCHECK(bytes_written == data_size); |