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

Side by Side Diff: chrome/browser/ui/views/app_list/win/app_list_service_win.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 "chrome/browser/ui/views/app_list/win/app_list_service_win.h" 5 #include "chrome/browser/ui/views/app_list/win/app_list_service_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 shortcut_properties.set_arguments(wide_switches); 252 shortcut_properties.set_arguments(wide_switches);
253 shortcut_properties.set_description(app_list_shortcut_name); 253 shortcut_properties.set_description(app_list_shortcut_name);
254 shortcut_properties.set_icon(chrome_exe, GetAppListIconIndex()); 254 shortcut_properties.set_icon(chrome_exe, GetAppListIconIndex());
255 shortcut_properties.set_app_id(app_model_id); 255 shortcut_properties.set_app_id(app_model_id);
256 256
257 for (size_t i = 0; i < shortcut_paths.size(); ++i) { 257 for (size_t i = 0; i < shortcut_paths.size(); ++i) {
258 base::FilePath shortcut_file = 258 base::FilePath shortcut_file =
259 shortcut_paths[i].Append(app_list_shortcut_name). 259 shortcut_paths[i].Append(app_list_shortcut_name).
260 AddExtension(installer::kLnkExt); 260 AddExtension(installer::kLnkExt);
261 if (!base::PathExists(shortcut_file.DirName()) && 261 if (!base::PathExists(shortcut_file.DirName()) &&
262 !file_util::CreateDirectory(shortcut_file.DirName())) { 262 !base::CreateDirectory(shortcut_file.DirName())) {
263 NOTREACHED(); 263 NOTREACHED();
264 return; 264 return;
265 } 265 }
266 success = success && base::win::CreateOrUpdateShortcutLink( 266 success = success && base::win::CreateOrUpdateShortcutLink(
267 shortcut_file, shortcut_properties, 267 shortcut_file, shortcut_properties,
268 base::win::SHORTCUT_CREATE_ALWAYS); 268 base::win::SHORTCUT_CREATE_ALWAYS);
269 } 269 }
270 270
271 if (success && pin_to_taskbar) { 271 if (success && pin_to_taskbar) {
272 base::FilePath shortcut_to_pin = 272 base::FilePath shortcut_to_pin =
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 weak_factory_.GetWeakPtr())); 557 weak_factory_.GetWeakPtr()));
558 } 558 }
559 559
560 namespace chrome { 560 namespace chrome {
561 561
562 AppListService* GetAppListServiceWin() { 562 AppListService* GetAppListServiceWin() {
563 return AppListServiceWin::GetInstance(); 563 return AppListServiceWin::GetInstance();
564 } 564 }
565 565
566 } // namespace chrome 566 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc ('k') | chrome/browser/ui/views/apps/native_app_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698