| OLD | NEW |
| 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 #include <atlbase.h> | 5 #include <atlbase.h> |
| 6 #include <security.h> | 6 #include <security.h> |
| 7 | 7 |
| 8 #include <iomanip> | 8 #include <iomanip> |
| 9 #include <iostream> | 9 #include <iostream> |
| 10 | 10 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 return S_OK; | 323 return S_OK; |
| 324 } | 324 } |
| 325 | 325 |
| 326 HRESULT SetupServiceState(const base::FilePath& user_data_dir, | 326 HRESULT SetupServiceState(const base::FilePath& user_data_dir, |
| 327 const std::vector<std::string>& printers) { | 327 const std::vector<std::string>& printers) { |
| 328 base::FilePath file = user_data_dir.Append(chrome::kServiceStateFileName); | 328 base::FilePath file = user_data_dir.Append(chrome::kServiceStateFileName); |
| 329 | 329 |
| 330 std::string contents; | 330 std::string contents; |
| 331 ServiceState service_state; | 331 ServiceState service_state; |
| 332 | 332 |
| 333 bool is_valid = file_util::ReadFileToString(file, &contents) && | 333 bool is_valid = base::ReadFileToString(file, &contents) && |
| 334 service_state.FromString(contents); | 334 service_state.FromString(contents); |
| 335 std::string proxy_id = service_state.proxy_id(); | 335 std::string proxy_id = service_state.proxy_id(); |
| 336 | 336 |
| 337 LOG(INFO) << file.value() << ": " << contents; | 337 LOG(INFO) << file.value() << ": " << contents; |
| 338 | 338 |
| 339 string16 message = | 339 string16 message = |
| 340 cloud_print::LoadLocalString(IDS_ADD_PRINTERS_USING_CHROME); | 340 cloud_print::LoadLocalString(IDS_ADD_PRINTERS_USING_CHROME); |
| 341 std::cout << "\n" << message.c_str() << "\n" ; | 341 std::cout << "\n" << message.c_str() << "\n" ; |
| 342 std::string new_contents = | 342 std::string new_contents = |
| 343 ChromeLauncher::CreateServiceStateFile(proxy_id, printers); | 343 ChromeLauncher::CreateServiceStateFile(proxy_id, printers); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 406 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
| 407 logging::InitLogging(settings); | 407 logging::InitLogging(settings); |
| 408 | 408 |
| 409 logging::SetMinLogLevel( | 409 logging::SetMinLogLevel( |
| 410 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableLogging) ? | 410 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableLogging) ? |
| 411 logging::LOG_INFO : logging::LOG_FATAL); | 411 logging::LOG_INFO : logging::LOG_FATAL); |
| 412 | 412 |
| 413 return _AtlModule.WinMain(0); | 413 return _AtlModule.WinMain(0); |
| 414 } | 414 } |
| 415 | 415 |
| OLD | NEW |