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

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

Issue 702803002: Fixed command-line to app shim in Windows app file association. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@win-file-associate
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/files/file_enumerator.h" 10 #include "base/files/file_enumerator.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 chrome_cmd_line.AppendArg("%1"); 420 chrome_cmd_line.AppendArg("%1");
421 421
422 // Get the command-line for calling the shim (e.g., 422 // Get the command-line for calling the shim (e.g.,
423 // "app_shim [--chrome-sxs] -- --app-id=..."). 423 // "app_shim [--chrome-sxs] -- --app-id=...").
424 CommandLine shim_cmd_line(app_shim_path); 424 CommandLine shim_cmd_line(app_shim_path);
425 // If this is a canary build, launch the shim in canary mode. 425 // If this is a canary build, launch the shim in canary mode.
426 if (InstallUtil::IsChromeSxSProcess()) 426 if (InstallUtil::IsChromeSxSProcess())
427 shim_cmd_line.AppendSwitch(installer::switches::kChromeSxS); 427 shim_cmd_line.AppendSwitch(installer::switches::kChromeSxS);
428 // Ensure all subsequent switches are treated as args to the shim. 428 // Ensure all subsequent switches are treated as args to the shim.
429 shim_cmd_line.AppendArg("--"); 429 shim_cmd_line.AppendArg("--");
430 for (const auto& arg : chrome_cmd_line.GetArgs()) 430 for (size_t i = 1; i < chrome_cmd_line.argv().size(); ++i)
Matt Giuca 2014/11/05 06:45:12 Note: The old code was calling GetArgs(), which re
431 shim_cmd_line.AppendArgNative(arg); 431 shim_cmd_line.AppendArgNative(chrome_cmd_line.argv()[i]);
432 432
433 return shim_cmd_line; 433 return shim_cmd_line;
434 } 434 }
435 435
436 // Gets the set of file extensions associated with a particular file handler. 436 // Gets the set of file extensions associated with a particular file handler.
437 // Uses both the MIME types and extensions. 437 // Uses both the MIME types and extensions.
438 void GetHandlerFileExtensions(const extensions::FileHandlerInfo& handler, 438 void GetHandlerFileExtensions(const extensions::FileHandlerInfo& handler,
439 std::set<base::string16>* exts) { 439 std::set<base::string16>* exts) {
440 for (const auto& mime : handler.types) { 440 for (const auto& mime : handler.types) {
441 std::vector<base::string16> mime_type_extensions; 441 std::vector<base::string16> mime_type_extensions;
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 760
761 } // namespace internals 761 } // namespace internals
762 762
763 void UpdateShortcutForTabContents(content::WebContents* web_contents) { 763 void UpdateShortcutForTabContents(content::WebContents* web_contents) {
764 // UpdateShortcutWorker will delete itself when it's done. 764 // UpdateShortcutWorker will delete itself when it's done.
765 UpdateShortcutWorker* worker = new UpdateShortcutWorker(web_contents); 765 UpdateShortcutWorker* worker = new UpdateShortcutWorker(web_contents);
766 worker->Run(); 766 worker->Run();
767 } 767 }
768 768
769 } // namespace web_app 769 } // namespace web_app
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698