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

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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 NOTREACHED(); 323 NOTREACHED();
324 return false; 324 return false;
325 } 325 }
326 326
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 std::wstring wide_switches(cmd_line.GetCommandLineString());
334 // properly quoted for a Windows command line. The method on
335 // CommandLine should probably be renamed to better reflect that
336 // fact.
Evan Martin 2011/07/15 21:05:16 This TODO still exists, then.
msw 2011/07/18 20:59:33 Done.
337 std::wstring wide_switches(cmd_line.command_line_string());
338 334
339 // Sanitize description 335 // Sanitize description
340 if (shortcut_info_.description.length() >= MAX_PATH) 336 if (shortcut_info_.description.length() >= MAX_PATH)
341 shortcut_info_.description.resize(MAX_PATH - 1); 337 shortcut_info_.description.resize(MAX_PATH - 1);
342 338
343 // Generates app id from web app url and profile path. 339 // Generates app id from web app url and profile path.
344 std::string app_name = 340 std::string app_name =
345 web_app::GenerateApplicationNameFromInfo(shortcut_info_); 341 web_app::GenerateApplicationNameFromInfo(shortcut_info_);
346 std::wstring app_id = ShellIntegration::GetAppId( 342 std::wstring app_id = ShellIntegration::GetAppId(
347 UTF8ToWide(app_name), profile_path_); 343 UTF8ToWide(app_name), profile_path_);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 526
531 #if defined(TOOLKIT_USES_GTK) 527 #if defined(TOOLKIT_USES_GTK)
532 std::string GetWMClassFromAppName(std::string app_name) { 528 std::string GetWMClassFromAppName(std::string app_name) {
533 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); 529 file_util::ReplaceIllegalCharactersInPath(&app_name, '_');
534 TrimString(app_name, "_", &app_name); 530 TrimString(app_name, "_", &app_name);
535 return app_name; 531 return app_name;
536 } 532 }
537 #endif 533 #endif
538 534
539 } // namespace web_app 535 } // namespace web_app
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698