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

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

Issue 3750001: base: Move SplitString functions into the base namespace and update the callers. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: brett review, reverted changes in o3d due to it's using an old base revision Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <ole2.h> 7 #include <ole2.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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 data.insert(0, reinterpret_cast<wchar_t*>(buffer), 183 data.insert(0, reinterpret_cast<wchar_t*>(buffer),
184 length / sizeof(wchar_t)); 184 length / sizeof(wchar_t));
185 185
186 // The key name is always ended with ":StringData". 186 // The key name is always ended with ":StringData".
187 const wchar_t kDataSuffix[] = L":StringData"; 187 const wchar_t kDataSuffix[] = L":StringData";
188 size_t i = ac.key.rfind(kDataSuffix); 188 size_t i = ac.key.rfind(kDataSuffix);
189 if (i != std::wstring::npos && ac.key.substr(i) == kDataSuffix) { 189 if (i != std::wstring::npos && ac.key.substr(i) == kDataSuffix) {
190 ac.key.erase(i); 190 ac.key.erase(i);
191 ac.is_url = (ac.key.find(L"://") != std::wstring::npos); 191 ac.is_url = (ac.key.find(L"://") != std::wstring::npos);
192 ac_list.push_back(ac); 192 ac_list.push_back(ac);
193 SplitString(data, L'\0', &ac_list[ac_list.size() - 1].data); 193 base::SplitString(data, L'\0', &ac_list[ac_list.size() - 1].data);
194 } 194 }
195 CoTaskMemFree(buffer); 195 CoTaskMemFree(buffer);
196 } 196 }
197 CoTaskMemFree(item_name); 197 CoTaskMemFree(item_name);
198 } 198 }
199 // Releases them before unload the dll. 199 // Releases them before unload the dll.
200 item.Release(); 200 item.Release();
201 pstore.Release(); 201 pstore.Release();
202 FreeLibrary(pstorec_dll); 202 FreeLibrary(pstorec_dll);
203 203
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 if (version < 0) { 576 if (version < 0) {
577 wchar_t buffer[128]; 577 wchar_t buffer[128];
578 DWORD buffer_length = sizeof(buffer); 578 DWORD buffer_length = sizeof(buffer);
579 RegKey reg_key(HKEY_LOCAL_MACHINE, 579 RegKey reg_key(HKEY_LOCAL_MACHINE,
580 L"Software\\Microsoft\\Internet Explorer", KEY_READ); 580 L"Software\\Microsoft\\Internet Explorer", KEY_READ);
581 bool result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL); 581 bool result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL);
582 version = (result ? _wtoi(buffer) : 0); 582 version = (result ? _wtoi(buffer) : 0);
583 } 583 }
584 return version; 584 return version;
585 } 585 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/firefox_importer_utils.cc ('k') | chrome/browser/importer/nss_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698