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

Side by Side Diff: chrome/installer/util/shell_util.h

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
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 // This file declares methods that are useful for integrating Chrome in 5 // This file declares methods that are useful for integrating Chrome in
6 // Windows shell. These methods are all static and currently part of 6 // Windows shell. These methods are all static and currently part of
7 // ShellUtil class. 7 // ShellUtil class.
8 8
9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 const string16& chrome_exe); 235 const string16& chrome_exe);
236 236
237 // Returns the application name of the program under |dist|. 237 // Returns the application name of the program under |dist|.
238 // This application name will be suffixed as is appropriate for the current 238 // This application name will be suffixed as is appropriate for the current
239 // install. 239 // install.
240 // This is the name that is registered with Default Programs on Windows and 240 // This is the name that is registered with Default Programs on Windows and
241 // that should thus be used to "make chrome default" and such. 241 // that should thus be used to "make chrome default" and such.
242 static string16 GetApplicationName(BrowserDistribution* dist, 242 static string16 GetApplicationName(BrowserDistribution* dist,
243 const string16& chrome_exe); 243 const string16& chrome_exe);
244 244
245 // Returns the AppUserModelId for |dist|. This identifier is unconditionally
246 // suffixed with the user id for user-level installs (in contrast to other
247 // registration entries which are suffix as described in
248 // GetCurrentInstallationSuffix() above).
249 static string16 GetBrowserModelId(BrowserDistribution* dist,
250 const string16& chrome_exe);
251
252 // Returns an AppUserModelId composed of each member of |components| separated
253 // by dots.
254 // The returned appid is guaranteed to be no longer than
255 // chrome::kMaxAppModelIdLength (some of the components might have been
256 // shortened to enforce this).
257 static string16 BuildAppModelId(const std::vector<string16>& components);
258
245 // Returns true if Chrome can make itself the default browser without relying 259 // Returns true if Chrome can make itself the default browser without relying
246 // on the Windows shell to prompt the user. This is the case for versions of 260 // on the Windows shell to prompt the user. This is the case for versions of
247 // Windows prior to Windows 8. 261 // Windows prior to Windows 8.
248 static bool CanMakeChromeDefaultUnattended(); 262 static bool CanMakeChromeDefaultUnattended();
249 263
250 // Make Chrome the default browser. This function works by going through 264 // Make Chrome the default browser. This function works by going through
251 // the url protocols and file associations that are related to general 265 // the url protocols and file associations that are related to general
252 // browsing, e.g. http, https, .html etc., and requesting to become the 266 // browsing, e.g. http, https, .html etc., and requesting to become the
253 // default handler for each. If any of these fails the operation will return 267 // default handler for each. If any of these fails the operation will return
254 // false to indicate failure, which is consistent with the return value of 268 // false to indicate failure, which is consistent with the return value of
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 const string16& icon_path, 404 const string16& icon_path,
391 int icon_index, 405 int icon_index,
392 uint32 options); 406 uint32 options);
393 407
394 private: 408 private:
395 DISALLOW_COPY_AND_ASSIGN(ShellUtil); 409 DISALLOW_COPY_AND_ASSIGN(ShellUtil);
396 }; 410 };
397 411
398 412
399 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 413 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/google_chrome_sxs_distribution.cc ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698