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

Side by Side Diff: chrome/browser/importer/ie_importer.cc

Issue 28128: Fix all places where we used the GetWinVersion function... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
« no previous file with comments | « chrome/browser/google_update.cc ('k') | chrome/browser/sandbox_policy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/browser/importer/ie_importer.h" 5 #include "chrome/browser/importer/ie_importer.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <intshcut.h> 8 #include <intshcut.h>
9 #include <pstore.h> 9 #include <pstore.h>
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 wchar_t buffer[MAX_PATH]; 444 wchar_t buffer[MAX_PATH];
445 if (FAILED(SHGetFolderPath(NULL, CSIDL_FAVORITES, NULL, 445 if (FAILED(SHGetFolderPath(NULL, CSIDL_FAVORITES, NULL,
446 SHGFP_TYPE_CURRENT, buffer))) 446 SHGFP_TYPE_CURRENT, buffer)))
447 return false; 447 return false;
448 info->path = buffer; 448 info->path = buffer;
449 449
450 // There is a Links folder under Favorites folder in Windows Vista, but it 450 // There is a Links folder under Favorites folder in Windows Vista, but it
451 // is not recording in Vista's registry. So in Vista, we assume the Links 451 // is not recording in Vista's registry. So in Vista, we assume the Links
452 // folder is under Favorites folder since it looks like there is not name 452 // folder is under Favorites folder since it looks like there is not name
453 // different in every language version of Windows Vista. 453 // different in every language version of Windows Vista.
454 if (win_util::GetWinVersion() != win_util::WINVERSION_VISTA) { 454 if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) {
455 // The Link folder name is stored in the registry. 455 // The Link folder name is stored in the registry.
456 DWORD buffer_length = sizeof(buffer); 456 DWORD buffer_length = sizeof(buffer);
457 if (!ReadFromRegistry(HKEY_CURRENT_USER, 457 if (!ReadFromRegistry(HKEY_CURRENT_USER,
458 L"Software\\Microsoft\\Internet Explorer\\Toolbar", 458 L"Software\\Microsoft\\Internet Explorer\\Toolbar",
459 L"LinksFolderName", buffer, &buffer_length)) 459 L"LinksFolderName", buffer, &buffer_length))
460 return false; 460 return false;
461 info->links_folder = buffer; 461 info->links_folder = buffer;
462 } else { 462 } else {
463 info->links_folder = L"Links"; 463 info->links_folder = L"Links";
464 } 464 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 if (version < 0) { 555 if (version < 0) {
556 wchar_t buffer[128]; 556 wchar_t buffer[128];
557 DWORD buffer_length = sizeof(buffer); 557 DWORD buffer_length = sizeof(buffer);
558 bool result = ReadFromRegistry(HKEY_LOCAL_MACHINE, 558 bool result = ReadFromRegistry(HKEY_LOCAL_MACHINE,
559 L"Software\\Microsoft\\Internet Explorer", 559 L"Software\\Microsoft\\Internet Explorer",
560 L"Version", buffer, &buffer_length); 560 L"Version", buffer, &buffer_length);
561 version = (result ? _wtoi(buffer) : 0); 561 version = (result ? _wtoi(buffer) : 0);
562 } 562 }
563 return version; 563 return version;
564 } 564 }
OLDNEW
« no previous file with comments | « chrome/browser/google_update.cc ('k') | chrome/browser/sandbox_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698