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

Side by Side Diff: chrome/installer/util/chrome_frame_distribution.cc

Issue 2339001: Separate version env variable for different distributions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 defines a specific implementation of BrowserDistribution class for 5 // This file defines a specific implementation of BrowserDistribution class for
6 // Chrome Frame. It overrides the bare minimum of methods necessary to get a 6 // Chrome Frame. It overrides the bare minimum of methods necessary to get a
7 // Chrome Frame installer that does not interact with Google Chrome or 7 // Chrome Frame installer that does not interact with Google Chrome or
8 // Chromium installations. 8 // Chromium installations.
9 9
10 #include "chrome/installer/util/chrome_frame_distribution.h" 10 #include "chrome/installer/util/chrome_frame_distribution.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 L"Google Chrome Frame"; 90 L"Google Chrome Frame";
91 } 91 }
92 92
93 std::wstring ChromeFrameDistribution::GetVersionKey() { 93 std::wstring ChromeFrameDistribution::GetVersionKey() {
94 std::wstring key(google_update::kRegPathClients); 94 std::wstring key(google_update::kRegPathClients);
95 key.append(L"\\"); 95 key.append(L"\\");
96 key.append(kChromeFrameGuid); 96 key.append(kChromeFrameGuid);
97 return key; 97 return key;
98 } 98 }
99 99
100 std::wstring ChromeFrameDistribution::GetEnvVersionKey() {
101 return L"CHROME_FRAME_VERSION";
102 }
103
100 bool ChromeFrameDistribution::CanSetAsDefault() { 104 bool ChromeFrameDistribution::CanSetAsDefault() {
101 return false; 105 return false;
102 } 106 }
103 107
104 void ChromeFrameDistribution::UpdateDiffInstallStatus(bool system_install, 108 void ChromeFrameDistribution::UpdateDiffInstallStatus(bool system_install,
105 bool incremental_install, installer_util::InstallStatus install_status) { 109 bool incremental_install, installer_util::InstallStatus install_status) {
106 HKEY reg_root = (system_install) ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; 110 HKEY reg_root = (system_install) ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
107 RegKey key; 111 RegKey key;
108 std::wstring ap_key_value; 112 std::wstring ap_key_value;
109 std::wstring reg_key(google_update::kRegPathClientState); 113 std::wstring reg_key(google_update::kRegPathClientState);
110 reg_key.append(L"\\"); 114 reg_key.append(L"\\");
111 reg_key.append(kChromeFrameGuid); 115 reg_key.append(kChromeFrameGuid);
112 if (!key.Open(reg_root, reg_key.c_str(), KEY_ALL_ACCESS) || 116 if (!key.Open(reg_root, reg_key.c_str(), KEY_ALL_ACCESS) ||
113 !key.ReadValue(google_update::kRegApField, &ap_key_value)) { 117 !key.ReadValue(google_update::kRegApField, &ap_key_value)) {
114 LOG(INFO) << "Application key not found."; 118 LOG(INFO) << "Application key not found.";
115 } else { 119 } else {
116 const char kMagicSuffix[] = "-full"; 120 const char kMagicSuffix[] = "-full";
117 if (LowerCaseEqualsASCII(ap_key_value, kMagicSuffix)) { 121 if (LowerCaseEqualsASCII(ap_key_value, kMagicSuffix)) {
118 key.DeleteValue(google_update::kRegApField); 122 key.DeleteValue(google_update::kRegApField);
119 } else { 123 } else {
120 size_t pos = ap_key_value.find(ASCIIToWide(kMagicSuffix)); 124 size_t pos = ap_key_value.find(ASCIIToWide(kMagicSuffix));
121 if (pos != std::wstring::npos) { 125 if (pos != std::wstring::npos) {
122 ap_key_value.erase(pos, strlen(kMagicSuffix)); 126 ap_key_value.erase(pos, strlen(kMagicSuffix));
123 key.WriteValue(google_update::kRegApField, ap_key_value.c_str()); 127 key.WriteValue(google_update::kRegApField, ap_key_value.c_str());
124 } 128 }
125 } 129 }
126 } 130 }
127 } 131 }
OLDNEW
« no previous file with comments | « chrome/installer/util/chrome_frame_distribution.h ('k') | chrome/installer/util/google_chrome_distribution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698