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

Side by Side Diff: chrome/browser/shell_integration_linux.cc

Issue 1358513003: Use correct IntToString variants in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
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/shell_integration_linux.h" 5 #include "chrome/browser/shell_integration_linux.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 8
9 #if defined(USE_GLIB) 9 #if defined(USE_GLIB)
10 #include <glib.h> 10 #include <glib.h>
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 685
686 base::FilePath desktop_path; 686 base::FilePath desktop_path;
687 if (!PathService::Get(base::DIR_USER_DESKTOP, &desktop_path)) 687 if (!PathService::Get(base::DIR_USER_DESKTOP, &desktop_path))
688 return base::FilePath(); 688 return base::FilePath();
689 689
690 base::FilePath filepath = desktop_path.Append(filename); 690 base::FilePath filepath = desktop_path.Append(filename);
691 base::FilePath alternative_filepath(filepath.value() + ".desktop"); 691 base::FilePath alternative_filepath(filepath.value() + ".desktop");
692 for (size_t i = 1; i < 100; ++i) { 692 for (size_t i = 1; i < 100; ++i) {
693 if (base::PathExists(base::FilePath(alternative_filepath))) { 693 if (base::PathExists(base::FilePath(alternative_filepath))) {
694 alternative_filepath = base::FilePath( 694 alternative_filepath = base::FilePath(
695 filepath.value() + "_" + base::IntToString(i) + ".desktop"); 695 filepath.value() + "_" + base::SizeTToString(i) + ".desktop");
696 } else { 696 } else {
697 return base::FilePath(alternative_filepath).BaseName(); 697 return base::FilePath(alternative_filepath).BaseName();
698 } 698 }
699 } 699 }
700 700
701 return base::FilePath(); 701 return base::FilePath();
702 } 702 }
703 703
704 base::FilePath GetExtensionShortcutFilename(const base::FilePath& profile_path, 704 base::FilePath GetExtensionShortcutFilename(const base::FilePath& profile_path,
705 const std::string& extension_id) { 705 const std::string& extension_id) {
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 base::FilePath applications_menu = GetDataWriteLocation(env.get()); 1053 base::FilePath applications_menu = GetDataWriteLocation(env.get());
1054 applications_menu = applications_menu.AppendASCII("applications"); 1054 applications_menu = applications_menu.AppendASCII("applications");
1055 std::vector<base::FilePath> shortcut_filenames_app_menu = 1055 std::vector<base::FilePath> shortcut_filenames_app_menu =
1056 GetExistingProfileShortcutFilenames(profile_path, applications_menu); 1056 GetExistingProfileShortcutFilenames(profile_path, applications_menu);
1057 for (const auto& menu : shortcut_filenames_app_menu) { 1057 for (const auto& menu : shortcut_filenames_app_menu) {
1058 DeleteShortcutInApplicationsMenu(menu, base::FilePath(kDirectoryFilename)); 1058 DeleteShortcutInApplicationsMenu(menu, base::FilePath(kDirectoryFilename));
1059 } 1059 }
1060 } 1060 }
1061 1061
1062 } // namespace shell_integration_linux 1062 } // namespace shell_integration_linux
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698