Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: cloud_print/service/win/cloud_print_service.cc

Issue 1408623002: Add cloud_print to the GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Work around warning in atlbase.h 5 // Work around warning in atlbase.h
6 // https://connect.microsoft.com/VisualStudio/feedback/details/1032199/atlbase-h -gives-warning-c4189-when-compiling-with-atl-no-com-support 6 // https://connect.microsoft.com/VisualStudio/feedback/details/1032199/atlbase-h -gives-warning-c4189-when-compiling-with-atl-no-com-support
7 #pragma warning(push) 7 #pragma warning(push)
8 #pragma warning(disable:4189) 8 #pragma warning(disable:4189)
9 #include <atlbase.h> 9 #include <atlbase.h>
10 #pragma warning(pop) 10 #pragma warning(pop)
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 cloud_print::LoadLocalString(IDS_ADD_PRINTERS_USING_CHROME); 354 cloud_print::LoadLocalString(IDS_ADD_PRINTERS_USING_CHROME);
355 std::cout << "\n" << message.c_str() << "\n" ; 355 std::cout << "\n" << message.c_str() << "\n" ;
356 std::string new_contents = 356 std::string new_contents =
357 ChromeLauncher::CreateServiceStateFile(proxy_id, printers); 357 ChromeLauncher::CreateServiceStateFile(proxy_id, printers);
358 358
359 if (new_contents.empty()) { 359 if (new_contents.empty()) {
360 return ReportError(E_FAIL, IDS_ERROR_FAILED_CREATE_CONFIG); 360 return ReportError(E_FAIL, IDS_ERROR_FAILED_CREATE_CONFIG);
361 } 361 }
362 362
363 if (new_contents != contents) { 363 if (new_contents != contents) {
364 size_t written = base::WriteFile(file, new_contents.c_str(), 364 size_t written = base::WriteFile(
365 new_contents.size()); 365 file, new_contents.c_str(), static_cast<int>(new_contents.size()));
366 if (written != new_contents.size()) { 366 if (written != new_contents.size()) {
367 return ReportError(cloud_print::GetLastHResult(), 367 return ReportError(cloud_print::GetLastHResult(),
368 IDS_ERROR_FAILED_CREATE_CONFIG); 368 IDS_ERROR_FAILED_CREATE_CONFIG);
369 } 369 }
370 } 370 }
371 371
372 return S_OK; 372 return S_OK;
373 } 373 }
374 374
375 void CheckRequirements() { 375 void CheckRequirements() {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; 421 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
422 logging::InitLogging(settings); 422 logging::InitLogging(settings);
423 423
424 logging::SetMinLogLevel( 424 logging::SetMinLogLevel(
425 command_line->HasSwitch(switches::kEnableLogging) ? 425 command_line->HasSwitch(switches::kEnableLogging) ?
426 logging::LOG_INFO : logging::LOG_FATAL); 426 logging::LOG_INFO : logging::LOG_FATAL);
427 427
428 return _AtlModule.WinMain(0); 428 return _AtlModule.WinMain(0);
429 } 429 }
430 430
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698