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

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

Issue 10542031: Suffix Chrome's appid on user-level installs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to r142814 Created 8 years, 6 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
« no previous file with comments | « chrome/browser/ui/web_applications/web_app_ui.cc ('k') | chrome/installer/setup/uninstall.cc » ('j') | 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 <shlobj.h> 7 #include <shlobj.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 string16 wide_switches(cmd_line.GetCommandLineString()); 199 string16 wide_switches(cmd_line.GetCommandLineString());
200 200
201 // Sanitize description 201 // Sanitize description
202 string16 description = shortcut_info.description; 202 string16 description = shortcut_info.description;
203 if (description.length() >= MAX_PATH) 203 if (description.length() >= MAX_PATH)
204 description.resize(MAX_PATH - 1); 204 description.resize(MAX_PATH - 1);
205 205
206 // Generates app id from web app url and profile path. 206 // Generates app id from web app url and profile path.
207 std::string app_name = 207 std::string app_name =
208 web_app::GenerateApplicationNameFromInfo(shortcut_info); 208 web_app::GenerateApplicationNameFromInfo(shortcut_info);
209 string16 app_id = ShellIntegration::GetAppId( 209 string16 app_id = ShellIntegration::GetAppModelIdForProfile(
210 UTF8ToUTF16(app_name), profile_path); 210 UTF8ToUTF16(app_name), profile_path);
211 211
212 FilePath shortcut_to_pin; 212 FilePath shortcut_to_pin;
213 213
214 bool success = true; 214 bool success = true;
215 for (size_t i = 0; i < shortcut_paths.size(); ++i) { 215 for (size_t i = 0; i < shortcut_paths.size(); ++i) {
216 FilePath shortcut_file = shortcut_paths[i].Append(file_name). 216 FilePath shortcut_file = shortcut_paths[i].Append(file_name).
217 ReplaceExtension(FILE_PATH_LITERAL(".lnk")); 217 ReplaceExtension(FILE_PATH_LITERAL(".lnk"));
218 218
219 int unique_number = 219 int unique_number =
(...skipping 30 matching lines...) Expand all
250 success = false; 250 success = false;
251 } 251 }
252 } 252 }
253 253
254 return success; 254 return success;
255 } 255 }
256 256
257 } // namespace internals 257 } // namespace internals
258 258
259 } // namespace web_app 259 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/ui/web_applications/web_app_ui.cc ('k') | chrome/installer/setup/uninstall.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698