google_chrome_sxs_distribution.cc revision 2a99a7e74a7f215066514fe81d2bfa6639d9eddd
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 3// found in the LICENSE file. 4// 5// This file defines implementation of GoogleChromeSxSDistribution. 6 7#include "chrome/installer/util/google_chrome_sxs_distribution.h" 8 9#include "base/command_line.h" 10#include "base/logging.h" 11 12#include "installer_util_strings.h" // NOLINT 13 14namespace { 15 16const wchar_t kChromeSxSGuid[] = L"{4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}"; 17const wchar_t kChannelName[] = L"canary"; 18const wchar_t kBrowserAppId[] = L"ChromeCanary"; 19const int kSxSIconIndex = 4; 20 21} // namespace 22 23GoogleChromeSxSDistribution::GoogleChromeSxSDistribution() 24 : GoogleChromeDistribution() { 25 GoogleChromeDistribution::set_product_guid(kChromeSxSGuid); 26} 27 28string16 GoogleChromeSxSDistribution::GetBaseAppName() { 29 return L"Google Chrome Canary"; 30} 31 32string16 GoogleChromeSxSDistribution::GetAppShortCutName() { 33 const string16& shortcut_name = 34 installer::GetLocalizedString(IDS_SXS_SHORTCUT_NAME_BASE); 35 return shortcut_name; 36} 37 38string16 GoogleChromeSxSDistribution::GetBaseAppId() { 39 return kBrowserAppId; 40} 41 42string16 GoogleChromeSxSDistribution::GetInstallSubDir() { 43 return GoogleChromeDistribution::GetInstallSubDir().append( 44 installer::kSxSSuffix); 45} 46 47string16 GoogleChromeSxSDistribution::GetUninstallRegPath() { 48 return GoogleChromeDistribution::GetUninstallRegPath().append( 49 installer::kSxSSuffix); 50} 51 52bool GoogleChromeSxSDistribution::CanSetAsDefault() { 53 return false; 54} 55 56int GoogleChromeSxSDistribution::GetIconIndex() { 57 return kSxSIconIndex; 58} 59 60bool GoogleChromeSxSDistribution::GetChromeChannel(string16* channel) { 61 *channel = kChannelName; 62 return true; 63} 64 65bool GoogleChromeSxSDistribution::GetCommandExecuteImplClsid( 66 string16* handler_class_uuid) { 67 return false; 68} 69 70bool GoogleChromeSxSDistribution::AppHostIsSupported() { 71 return false; 72} 73 74bool GoogleChromeSxSDistribution::ShouldSetExperimentLabels() { 75 return true; 76} 77 78bool GoogleChromeSxSDistribution::HasUserExperiments() { 79 return true; 80} 81 82string16 GoogleChromeSxSDistribution::ChannelName() { 83 return kChannelName; 84} 85