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

Side by Side Diff: chrome/installer/setup/install.cc

Issue 6090006: Regkey functions return error code instead of bool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/installer/setup/install.h" 5 #include "chrome/installer/setup/install.h"
6 6
7 #include <shlobj.h> 7 #include <shlobj.h>
8 #include <time.h> 8 #include <time.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 RegKey key; 155 RegKey key;
156 ChannelInfo other_info; 156 ChannelInfo other_info;
157 std::vector<std::wstring>::const_iterator kscan = keys.begin(); 157 std::vector<std::wstring>::const_iterator kscan = keys.begin();
158 std::vector<std::wstring>::const_iterator kend = keys.end(); 158 std::vector<std::wstring>::const_iterator kend = keys.end();
159 for (; kscan != kend; ++kscan) { 159 for (; kscan != kend; ++kscan) {
160 // Handle the case where the ClientState key doesn't exist by creating it. 160 // Handle the case where the ClientState key doesn't exist by creating it.
161 // This takes care of the multi-installer's package key, which is not 161 // This takes care of the multi-installer's package key, which is not
162 // created by Google Update for us. 162 // created by Google Update for us.
163 if (!key.Open(reg_root, kscan->c_str(), KEY_QUERY_VALUE) || 163 if (key.Open(reg_root, kscan->c_str(), KEY_QUERY_VALUE) != ERROR_SUCCESS ||
164 !other_info.Initialize(key)) { 164 !other_info.Initialize(key)) {
165 other_info.set_value(std::wstring()); 165 other_info.set_value(std::wstring());
166 } 166 }
167 if (!other_info.Equals(channel_info)) { 167 if (!other_info.Equals(channel_info)) {
168 if (!key.Valid()) 168 if (!key.Valid())
169 install_list->AddCreateRegKeyWorkItem(reg_root, *kscan); 169 install_list->AddCreateRegKeyWorkItem(reg_root, *kscan);
170 install_list->AddSetRegValueWorkItem(reg_root, *kscan, 170 install_list->AddSetRegValueWorkItem(reg_root, *kscan,
171 google_update::kRegApField, 171 google_update::kRegApField,
172 channel_info.value(), true); 172 channel_info.value(), true);
173 } 173 }
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 } 562 }
563 563
564 install.RemoveOldVersionDirectories(existing_version.get() ? 564 install.RemoveOldVersionDirectories(existing_version.get() ?
565 *existing_version.get() : new_version); 565 *existing_version.get() : new_version);
566 } 566 }
567 567
568 return result; 568 return result;
569 } 569 }
570 570
571 } // namespace installer 571 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/chrome_frame_ready_mode.cc ('k') | chrome/installer/setup/install_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698