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

Side by Side Diff: chrome/browser/web_applications/web_app_win.cc

Issue 189333004: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 #include "chrome/browser/web_applications/web_app_win.h" 5 #include "chrome/browser/web_applications/web_app_win.h"
6 6
7 #include <shlobj.h> 7 #include <shlobj.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // Check whether there is an existing shortcut to this app. 220 // Check whether there is an existing shortcut to this app.
221 std::vector<base::FilePath> shortcut_files = 221 std::vector<base::FilePath> shortcut_files =
222 FindAppShortcutsByProfileAndTitle(shortcut_paths[i], 222 FindAppShortcutsByProfileAndTitle(shortcut_paths[i],
223 shortcut_info.profile_path, 223 shortcut_info.profile_path,
224 shortcut_info.title); 224 shortcut_info.title);
225 if (!shortcut_files.empty()) 225 if (!shortcut_files.empty())
226 continue; 226 continue;
227 } 227 }
228 if (shortcut_paths[i] != web_app_path) { 228 if (shortcut_paths[i] != web_app_path) {
229 int unique_number = 229 int unique_number =
230 file_util::GetUniquePathNumber(shortcut_file, FILE_PATH_LITERAL("")); 230 base::GetUniquePathNumber(shortcut_file,
231 base::FilePath::StringType());
231 if (unique_number == -1) { 232 if (unique_number == -1) {
232 success = false; 233 success = false;
233 continue; 234 continue;
234 } else if (unique_number > 0) { 235 } else if (unique_number > 0) {
235 shortcut_file = shortcut_file.InsertBeforeExtensionASCII( 236 shortcut_file = shortcut_file.InsertBeforeExtensionASCII(
236 base::StringPrintf(" (%d)", unique_number)); 237 base::StringPrintf(" (%d)", unique_number));
237 } 238 }
238 } 239 }
239 base::win::ShortcutProperties shortcut_properties; 240 base::win::ShortcutProperties shortcut_properties;
240 shortcut_properties.set_target(chrome_exe); 241 shortcut_properties.set_target(chrome_exe);
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 } 532 }
532 shortcut_paths.push_back(path); 533 shortcut_paths.push_back(path);
533 } 534 }
534 } 535 }
535 return shortcut_paths; 536 return shortcut_paths;
536 } 537 }
537 538
538 } // namespace internals 539 } // namespace internals
539 540
540 } // namespace web_app 541 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/media_folder_finder_unittest.cc ('k') | content/browser/download/download_file_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698