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

Side by Side Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 18153015: Stop creating shortcut for web apps when it is installing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove comment. Created 7 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
« 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/ui/app_list/app_list_view_delegate.h" 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 void AppListViewDelegate::GetShortcutPathForApp( 97 void AppListViewDelegate::GetShortcutPathForApp(
98 const std::string& app_id, 98 const std::string& app_id,
99 const base::Callback<void(const base::FilePath&)>& callback) { 99 const base::Callback<void(const base::FilePath&)>& callback) {
100 #if defined(OS_WIN) 100 #if defined(OS_WIN)
101 ExtensionService* service = profile_->GetExtensionService(); 101 ExtensionService* service = profile_->GetExtensionService();
102 DCHECK(service); 102 DCHECK(service);
103 const extensions::Extension* extension = 103 const extensions::Extension* extension =
104 service->GetInstalledExtension(app_id); 104 service->GetInstalledExtension(app_id);
105 DCHECK(extension); 105 if (!extension) {
106 callback.Run(base::FilePath());
107 return;
108 }
106 109
107 base::FilePath app_data_dir( 110 base::FilePath app_data_dir(
108 web_app::GetWebAppDataDirectory(profile_->GetPath(), 111 web_app::GetWebAppDataDirectory(profile_->GetPath(),
109 extension->id(), 112 extension->id(),
110 GURL())); 113 GURL()));
111 114
112 web_app::UpdateShortcutInfoAndIconForApp( 115 web_app::UpdateShortcutInfoAndIconForApp(
113 *extension, 116 *extension,
114 profile_, 117 profile_,
115 base::Bind(CreateShortcutInWebAppDir, app_data_dir, callback)); 118 base::Bind(CreateShortcutInWebAppDir, app_data_dir, callback));
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 202 }
200 203
201 void AppListViewDelegate::OpenFeedback() { 204 void AppListViewDelegate::OpenFeedback() {
202 chrome::HostDesktopType desktop = chrome::GetHostDesktopTypeForNativeWindow( 205 chrome::HostDesktopType desktop = chrome::GetHostDesktopTypeForNativeWindow(
203 controller_->GetAppListWindow()); 206 controller_->GetAppListWindow());
204 Browser* browser = chrome::FindOrCreateTabbedBrowser( 207 Browser* browser = chrome::FindOrCreateTabbedBrowser(
205 profile_, desktop); 208 profile_, desktop);
206 chrome::ShowFeedbackPage(browser, std::string(), 209 chrome::ShowFeedbackPage(browser, std::string(),
207 chrome::kAppLauncherCategoryTag); 210 chrome::kAppLauncherCategoryTag);
208 } 211 }
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