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

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

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « cloud_print/gcp20/prototype/print_job_handler.cc ('k') | cloud_print/service/win/service_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698