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