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

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

Issue 819823002: Fixed create application shortcuts on Windows/Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed CreateShortcutsWithInfo to look for all extensions Created 6 years 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.h" 5 #include "chrome/browser/web_applications/web_app.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // For example, creating a hosted app from a website. Double check that 376 // For example, creating a hosted app from a website. Double check that
377 // it still exists. 377 // it still exists.
378 Profile* profile = g_browser_process->profile_manager()->GetProfileByPath( 378 Profile* profile = g_browser_process->profile_manager()->GetProfileByPath(
379 shortcut_info.profile_path); 379 shortcut_info.profile_path);
380 if (!profile) 380 if (!profile)
381 return; 381 return;
382 382
383 extensions::ExtensionRegistry* registry = 383 extensions::ExtensionRegistry* registry =
384 extensions::ExtensionRegistry::Get(profile); 384 extensions::ExtensionRegistry::Get(profile);
385 const extensions::Extension* extension = registry->GetExtensionById( 385 const extensions::Extension* extension = registry->GetExtensionById(
386 shortcut_info.extension_id, extensions::ExtensionRegistry::ENABLED); 386 shortcut_info.extension_id, extensions::ExtensionRegistry::EVERYTHING);
387 if (!extension) 387 if (!extension)
388 return; 388 return;
389 389
390 ScheduleCreatePlatformShortcut(reason, locations, shortcut_info, 390 ScheduleCreatePlatformShortcut(reason, locations, shortcut_info,
391 file_handlers_info); 391 file_handlers_info);
392 } 392 }
393 393
394 void CreateNonAppShortcut(const ShortcutLocations& locations, 394 void CreateNonAppShortcut(const ShortcutLocations& locations,
395 const ShortcutInfo& shortcut_info) { 395 const ShortcutInfo& shortcut_info) {
396 ScheduleCreatePlatformShortcut(SHORTCUT_CREATION_AUTOMATED, locations, 396 ScheduleCreatePlatformShortcut(SHORTCUT_CREATION_AUTOMATED, locations,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 469
470 #if defined(OS_LINUX) 470 #if defined(OS_LINUX)
471 std::string GetWMClassFromAppName(std::string app_name) { 471 std::string GetWMClassFromAppName(std::string app_name) {
472 base::i18n::ReplaceIllegalCharactersInPath(&app_name, '_'); 472 base::i18n::ReplaceIllegalCharactersInPath(&app_name, '_');
473 base::TrimString(app_name, "_", &app_name); 473 base::TrimString(app_name, "_", &app_name);
474 return app_name; 474 return app_name;
475 } 475 }
476 #endif 476 #endif
477 477
478 } // namespace web_app 478 } // 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