More boring fixups

This commit is contained in:
Paul Betts 2016-03-09 11:27:16 -08:00 committed by Cheng Zhao
parent 1c01e4955f
commit f4ec369873
5 changed files with 7 additions and 8 deletions

View file

@ -102,9 +102,9 @@ int ShowMessageBoxUTF16(HWND parent,
base::win::ScopedHICON hicon;
if (!icon.isNull()) {
hicon.Set(IconUtil::CreateHICONFromSkBitmap(*icon.bitmap()));
hicon = IconUtil::CreateHICONFromSkBitmap(*icon.bitmap());
config.dwFlags |= TDF_USE_HICON_MAIN;
config.hMainIcon = hicon.Get();
config.hMainIcon = hicon.get();
} else {
// Show icon according to dialog's type.
switch (type) {

View file

@ -91,7 +91,7 @@ bool TaskbarHost::SetThumbarButtons(
if (!button.icon.IsEmpty()) {
thumb_button.dwMask |= THB_ICON;
icons[i] = IconUtil::CreateHICONFromSkBitmap(button.icon.AsBitmap());
thumb_button.hIcon = icons[i].Get();
thumb_button.hIcon = icons[i].get();
}
// Set tooltip.
@ -139,7 +139,7 @@ bool TaskbarHost::SetOverlayIcon(
base::win::ScopedHICON icon(
IconUtil::CreateHICONFromSkBitmap(overlay.AsBitmap()));
return SUCCEEDED(
taskbar_->SetOverlayIcon(window, icon, base::UTF8ToUTF16(text).c_str()));
taskbar_->SetOverlayIcon(window, icon.get(), base::UTF8ToUTF16(text).c_str()));
}
bool TaskbarHost::HandleThumbarButtonEvent(int button_id) {

View file

@ -158,11 +158,11 @@ bool ReadImageSkiaFromICO(gfx::ImageSkia* image, const base::FilePath& path) {
base::win::ScopedHICON icon(static_cast<HICON>(
LoadImage(NULL, image_path.value().c_str(), IMAGE_ICON, 0, 0,
LR_DEFAULTSIZE | LR_LOADFROMFILE)));
if (!icon)
if (!icon.get())
return false;
// Convert the icon from the Windows specific HICON to gfx::ImageSkia.
scoped_ptr<SkBitmap> bitmap(IconUtil::CreateSkBitmapFromHICON(icon));
scoped_ptr<SkBitmap> bitmap(IconUtil:: CreateSkBitmapFromHICON(icon.get()));
image->AddRepresentation(gfx::ImageSkiaRep(*bitmap, 1.0f));
return true;
}

View file

@ -86,7 +86,7 @@ bool WriteReportIDToFile(const std::wstring& dump_path,
if (!file.is_open())
return false;
int64 seconds_since_epoch =
int64_t seconds_since_epoch =
(base::Time::Now() - base::Time::UnixEpoch()).InSeconds();
std::wstring line = base::Int64ToString16(seconds_since_epoch);
line += L',';

View file

@ -12,7 +12,6 @@
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "base/win/metro.h"
#include "base/win/scoped_co_mem.h"
#include "chrome/common/chrome_constants.h"