| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "cloud_print/service/win/installer.h" | 5 #include "cloud_print/service/win/installer.h" | 
| 6 | 6 | 
| 7 #include <winerror.h> | 7 #include <winerror.h> | 
| 8 | 8 | 
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" | 
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 31   if (with_subdir) | 31   if (with_subdir) | 
| 32     path = path.Append(cloud_print::LoadLocalString(IDS_FULL_PRODUCT_NAME)); | 32     path = path.Append(cloud_print::LoadLocalString(IDS_FULL_PRODUCT_NAME)); | 
| 33   return path.InsertBeforeExtension(L".lnk"); | 33   return path.InsertBeforeExtension(L".lnk"); | 
| 34 } | 34 } | 
| 35 | 35 | 
| 36 void CreateShortcut(int dir_key, bool with_subdir, | 36 void CreateShortcut(int dir_key, bool with_subdir, | 
| 37                     base::win::ShortcutOperation operation) { | 37                     base::win::ShortcutOperation operation) { | 
| 38   base::FilePath path = GetShortcutPath(dir_key, with_subdir); | 38   base::FilePath path = GetShortcutPath(dir_key, with_subdir); | 
| 39   if (path.empty()) | 39   if (path.empty()) | 
| 40     return; | 40     return; | 
| 41   file_util::CreateDirectory(path.DirName()); | 41   base::CreateDirectory(path.DirName()); | 
| 42   base::win::ShortcutProperties properties; | 42   base::win::ShortcutProperties properties; | 
| 43 | 43 | 
| 44   base::FilePath exe_path; | 44   base::FilePath exe_path; | 
| 45   if (!PathService::Get(base::FILE_EXE, &exe_path)) | 45   if (!PathService::Get(base::FILE_EXE, &exe_path)) | 
| 46     return; | 46     return; | 
| 47   exe_path = exe_path.DirName().Append(base::FilePath(kConfigBinaryName)); | 47   exe_path = exe_path.DirName().Append(base::FilePath(kConfigBinaryName)); | 
| 48   properties.set_target(exe_path); | 48   properties.set_target(exe_path); | 
| 49   properties.set_working_dir(exe_path.DirName()); | 49   properties.set_working_dir(exe_path.DirName()); | 
| 50   CreateOrUpdateShortcutLink(path, properties, operation); | 50   CreateOrUpdateShortcutLink(path, properties, operation); | 
| 51 } | 51 } | 
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 135 CloudPrintServiceSetupModule _AtlModule; | 135 CloudPrintServiceSetupModule _AtlModule; | 
| 136 | 136 | 
| 137 int WINAPI WinMain(__in  HINSTANCE hInstance, | 137 int WINAPI WinMain(__in  HINSTANCE hInstance, | 
| 138                    __in  HINSTANCE hPrevInstance, | 138                    __in  HINSTANCE hPrevInstance, | 
| 139                    __in  LPSTR lpCmdLine, | 139                    __in  LPSTR lpCmdLine, | 
| 140                    __in  int nCmdShow) { | 140                    __in  int nCmdShow) { | 
| 141   base::AtExitManager at_exit; | 141   base::AtExitManager at_exit; | 
| 142   CommandLine::Init(0, NULL); | 142   CommandLine::Init(0, NULL); | 
| 143   return ProcessInstallerSwitches(); | 143   return ProcessInstallerSwitches(); | 
| 144 } | 144 } | 
| OLD | NEW | 
|---|