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

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

Issue 7386002: Rename CommandLine::GetCommandLineString(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge. Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 5 #include "chrome/browser/web_applications/web_app.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #endif // defined(OS_WIN) 9 #endif // defined(OS_WIN)
10 10
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 // Working directory. 327 // Working directory.
328 FilePath chrome_folder = chrome_exe.DirName(); 328 FilePath chrome_folder = chrome_exe.DirName();
329 329
330 CommandLine cmd_line = 330 CommandLine cmd_line =
331 ShellIntegration::CommandLineArgsForLauncher(shortcut_info_.url, 331 ShellIntegration::CommandLineArgsForLauncher(shortcut_info_.url,
332 shortcut_info_.extension_id); 332 shortcut_info_.extension_id);
333 // TODO(evan): we rely on the fact that command_line_string() is 333 // TODO(evan): we rely on the fact that command_line_string() is
334 // properly quoted for a Windows command line. The method on 334 // properly quoted for a Windows command line. The method on
335 // CommandLine should probably be renamed to better reflect that 335 // CommandLine should probably be renamed to better reflect that
336 // fact. 336 // fact.
337 std::wstring wide_switches(cmd_line.command_line_string()); 337 std::wstring wide_switches(cmd_line.GetCommandLineString());
338 338
339 // Sanitize description 339 // Sanitize description
340 if (shortcut_info_.description.length() >= MAX_PATH) 340 if (shortcut_info_.description.length() >= MAX_PATH)
341 shortcut_info_.description.resize(MAX_PATH - 1); 341 shortcut_info_.description.resize(MAX_PATH - 1);
342 342
343 // Generates app id from web app url and profile path. 343 // Generates app id from web app url and profile path.
344 std::string app_name = 344 std::string app_name =
345 web_app::GenerateApplicationNameFromInfo(shortcut_info_); 345 web_app::GenerateApplicationNameFromInfo(shortcut_info_);
346 std::wstring app_id = ShellIntegration::GetAppId( 346 std::wstring app_id = ShellIntegration::GetAppId(
347 UTF8ToWide(app_name), profile_path_); 347 UTF8ToWide(app_name), profile_path_);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 530
531 #if defined(TOOLKIT_USES_GTK) 531 #if defined(TOOLKIT_USES_GTK)
532 std::string GetWMClassFromAppName(std::string app_name) { 532 std::string GetWMClassFromAppName(std::string app_name) {
533 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); 533 file_util::ReplaceIllegalCharactersInPath(&app_name, '_');
534 TrimString(app_name, "_", &app_name); 534 TrimString(app_name, "_", &app_name);
535 return app_name; 535 return app_name;
536 } 536 }
537 #endif 537 #endif
538 538
539 } // namespace web_app 539 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/options_ui.cc ('k') | chrome/common/service_process_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698