This commit is contained in:
Paul Betts 2015-12-07 10:02:06 -08:00
Родитель d0be6c7411
Коммит 3931ebb7ef
8 изменённых файлов: 16 добавлений и 16 удалений

Просмотреть файл

@ -127,7 +127,7 @@ void Browser::SetUserTasks(const std::vector<UserTask>& tasks) {
PCWSTR Browser::GetAppUserModelID() { PCWSTR Browser::GetAppUserModelID() {
if (app_user_model_id_.empty()) { if (app_user_model_id_.empty()) {
SetAppUserModelID(ReplaceStringPlaceholders( SetAppUserModelID(base::ReplaceStringPlaceholders(
kAppUserModelIDFormat, base::UTF8ToUTF16(GetName()), nullptr)); kAppUserModelIDFormat, base::UTF8ToUTF16(GetName()), nullptr));
} }

Просмотреть файл

@ -51,7 +51,7 @@ void ConvertFilters(const Filters& filters,
std::vector<std::string> extensions(filter.second); std::vector<std::string> extensions(filter.second);
for (size_t j = 0; j < extensions.size(); ++j) for (size_t j = 0; j < extensions.size(); ++j)
extensions[j].insert(0, "*."); extensions[j].insert(0, "*.");
buffer->push_back(base::UTF8ToWide(JoinString(extensions, ";"))); buffer->push_back(base::UTF8ToWide(base::JoinString(extensions, ";")));
spec.pszSpec = buffer->back().c_str(); spec.pszSpec = buffer->back().c_str();
filterspec->push_back(spec); filterspec->push_back(spec);
@ -273,7 +273,9 @@ bool ShowSaveDialog(atom::NativeWindow* parent_window,
bool matched = false; bool matched = false;
for (size_t i = 0; i < filter.second.size(); ++i) { for (size_t i = 0; i < filter.second.size(); ++i) {
if (filter.second[i] == "*" || if (filter.second[i] == "*" ||
base::EndsWith(file_name, filter.second[i], false)) { base::EndsWith(
file_name, filter.second[i],
base::CompareCase::INSENSITIVE_ASCII)) {
matched = true; matched = true;
break;; break;;
} }

Просмотреть файл

@ -153,9 +153,9 @@ void CrashReporterWin::InitBreakpad(const std::string& product_name,
return; return;
} }
base::string16 pipe_name = ReplaceStringPlaceholders( base::string16 pipe_name = base::ReplaceStringPlaceholders(
kPipeNameFormat, base::UTF8ToUTF16(product_name), NULL); kPipeNameFormat, base::UTF8ToUTF16(product_name), NULL);
base::string16 wait_name = ReplaceStringPlaceholders( base::string16 wait_name = base::ReplaceStringPlaceholders(
kWaitEventFormat, base::UTF8ToUTF16(product_name), NULL); kWaitEventFormat, base::UTF8ToUTF16(product_name), NULL);
// Wait until the crash service is started. // Wait until the crash service is started.

Просмотреть файл

@ -118,7 +118,7 @@ HWND g_top_window = NULL;
bool CreateTopWindow(HINSTANCE instance, bool CreateTopWindow(HINSTANCE instance,
const base::string16& application_name, const base::string16& application_name,
bool visible) { bool visible) {
base::string16 class_name = ReplaceStringPlaceholders( base::string16 class_name = base::ReplaceStringPlaceholders(
kClassNameFormat, application_name, NULL); kClassNameFormat, application_name, NULL);
WNDCLASSEXW wcx = {0}; WNDCLASSEXW wcx = {0};
@ -309,7 +309,7 @@ bool CrashService::Initialize(const base::string16& application_name,
// Create or open an event to signal the browser process that the crash // Create or open an event to signal the browser process that the crash
// service is initialized. // service is initialized.
base::string16 wait_name = ReplaceStringPlaceholders( base::string16 wait_name = base::ReplaceStringPlaceholders(
kWaitEventFormat, application_name, NULL); kWaitEventFormat, application_name, NULL);
HANDLE wait_event = ::CreateEventW(NULL, TRUE, TRUE, wait_name.c_str()); HANDLE wait_event = ::CreateEventW(NULL, TRUE, TRUE, wait_name.c_str());
::SetEvent(wait_event); ::SetEvent(wait_event);
@ -524,4 +524,3 @@ PSECURITY_DESCRIPTOR CrashService::GetSecurityDescriptorForLowIntegrity() {
} }
} // namespace breakpad } // namespace breakpad

Просмотреть файл

@ -68,7 +68,7 @@ int Main(const wchar_t* cmd) {
VLOG(1) << "Session start. cmdline is [" << cmd << "]"; VLOG(1) << "Session start. cmdline is [" << cmd << "]";
// Setting the crash reporter. // Setting the crash reporter.
base::string16 pipe_name = ReplaceStringPlaceholders(kPipeNameFormat, base::string16 pipe_name = base::ReplaceStringPlaceholders(kPipeNameFormat,
application_name, application_name,
NULL); NULL);
cmd_line.AppendSwitch("no-window"); cmd_line.AppendSwitch("no-window");

Просмотреть файл

@ -57,7 +57,7 @@ class TtsPlatformImplWin : public TtsPlatformImpl {
int char_position_; int char_position_;
bool paused_; bool paused_;
friend struct DefaultSingletonTraits<TtsPlatformImplWin>; friend struct base::DefaultSingletonTraits<TtsPlatformImplWin>;
DISALLOW_COPY_AND_ASSIGN(TtsPlatformImplWin); DISALLOW_COPY_AND_ASSIGN(TtsPlatformImplWin);
}; };
@ -246,12 +246,12 @@ TtsPlatformImplWin::TtsPlatformImplWin()
// static // static
TtsPlatformImplWin* TtsPlatformImplWin::GetInstance() { TtsPlatformImplWin* TtsPlatformImplWin::GetInstance() {
return Singleton<TtsPlatformImplWin, return base::Singleton< TtsPlatformImplWin,
LeakySingletonTraits<TtsPlatformImplWin> >::get(); base::LeakySingletonTraits<TtsPlatformImplWin> >::get();
} }
// static // static
void TtsPlatformImplWin::SpeechEventCallback( void TtsPlatformImplWin::SpeechEventCallback(
WPARAM w_param, LPARAM l_param) { WPARAM w_param, LPARAM l_param) {
GetInstance()->OnSpeechEvent(); GetInstance()->OnSpeechEvent();
} }

Просмотреть файл

@ -135,7 +135,6 @@ bool PrintWebViewHelper::PrintPagesNative(blink::WebFrame* frame,
printed_page_params.page_size = page_size_in_dpi[i]; printed_page_params.page_size = page_size_in_dpi[i];
printed_page_params.content_area = content_area_in_dpi[i]; printed_page_params.content_area = content_area_in_dpi[i];
Send(new PrintHostMsg_DidPrintPage(routing_id(), printed_page_params)); Send(new PrintHostMsg_DidPrintPage(routing_id(), printed_page_params));
printed_page_params.metafile_data_handle = INVALID_HANDLE_VALUE;
} }
return true; return true;
} }

Просмотреть файл

@ -228,7 +228,7 @@ void StreamListenSocket::CloseSocket() {
void StreamListenSocket::WatchSocket(WaitState state) { void StreamListenSocket::WatchSocket(WaitState state) {
#if defined(OS_WIN) #if defined(OS_WIN)
WSAEventSelect(socket_, socket_event_, FD_ACCEPT | FD_CLOSE | FD_READ); WSAEventSelect(socket_, socket_event_, FD_ACCEPT | FD_CLOSE | FD_READ);
watcher_.StartWatching(socket_event_, this); watcher_.StartWatchingOnce(socket_event_, this);
#elif defined(OS_POSIX) #elif defined(OS_POSIX)
// Implicitly calls StartWatchingFileDescriptor(). // Implicitly calls StartWatchingFileDescriptor().
base::MessageLoopForIO::current()->WatchFileDescriptor( base::MessageLoopForIO::current()->WatchFileDescriptor(
@ -264,7 +264,7 @@ void StreamListenSocket::OnObjectSignaled(HANDLE object) {
return; return;
} }
// The object was reset by WSAEnumNetworkEvents. Watch for the next signal. // The object was reset by WSAEnumNetworkEvents. Watch for the next signal.
watcher_.StartWatching(object, this); watcher_.StartWatchingOnce(object, this);
if (ev.lNetworkEvents == 0) { if (ev.lNetworkEvents == 0) {
// Occasionally the event is set even though there is no new data. // Occasionally the event is set even though there is no new data.