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

Side by Side Diff: chrome/utility/importer/ie_importer_win.cc

Issue 120593003: Move kFileScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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) 2012 The Chromium Authors. All rights reserved. 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 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/utility/importer/ie_importer_win.h" 5 #include "chrome/utility/importer/ie_importer_win.h"
6 6
7 #include <ole2.h> 7 #include <ole2.h>
8 #include <intshcut.h> 8 #include <intshcut.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #include <urlhist.h> 10 #include <urlhist.h>
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 bridge_->AddBookmarks(bookmarks, first_folder_name); 464 bridge_->AddBookmarks(bookmarks, first_folder_name);
465 } 465 }
466 if (!favicons.empty() && !cancelled()) 466 if (!favicons.empty() && !cancelled())
467 bridge_->SetFavicons(favicons); 467 bridge_->SetFavicons(favicons);
468 } 468 }
469 469
470 void IEImporter::ImportHistory() { 470 void IEImporter::ImportHistory() {
471 const std::string kSchemes[] = {content::kHttpScheme, 471 const std::string kSchemes[] = {content::kHttpScheme,
472 content::kHttpsScheme, 472 content::kHttpsScheme,
473 content::kFtpScheme, 473 content::kFtpScheme,
474 chrome::kFileScheme}; 474 content::kFileScheme};
475 int total_schemes = arraysize(kSchemes); 475 int total_schemes = arraysize(kSchemes);
476 476
477 base::win::ScopedComPtr<IUrlHistoryStg2> url_history_stg2; 477 base::win::ScopedComPtr<IUrlHistoryStg2> url_history_stg2;
478 HRESULT result; 478 HRESULT result;
479 result = url_history_stg2.CreateInstance(CLSID_CUrlHistory, NULL, 479 result = url_history_stg2.CreateInstance(CLSID_CUrlHistory, NULL,
480 CLSCTX_INPROC_SERVER); 480 CLSCTX_INPROC_SERVER);
481 if (FAILED(result)) 481 if (FAILED(result))
482 return; 482 return;
483 base::win::ScopedComPtr<IEnumSTATURL> enum_url; 483 base::win::ScopedComPtr<IEnumSTATURL> enum_url;
484 if (SUCCEEDED(result = url_history_stg2->EnumUrls(enum_url.Receive()))) { 484 if (SUCCEEDED(result = url_history_stg2->EnumUrls(enum_url.Receive()))) {
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 static int version = -1; 872 static int version = -1;
873 if (version < 0) { 873 if (version < 0) {
874 wchar_t buffer[128]; 874 wchar_t buffer[128];
875 DWORD buffer_length = sizeof(buffer); 875 DWORD buffer_length = sizeof(buffer);
876 base::win::RegKey reg_key(HKEY_LOCAL_MACHINE, kIEVersionKey, KEY_READ); 876 base::win::RegKey reg_key(HKEY_LOCAL_MACHINE, kIEVersionKey, KEY_READ);
877 LONG result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL); 877 LONG result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL);
878 version = ((result == ERROR_SUCCESS)? _wtoi(buffer) : 0); 878 version = ((result == ERROR_SUCCESS)? _wtoi(buffer) : 0);
879 } 879 }
880 return version; 880 return version;
881 } 881 }
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/user_script_slave.cc ('k') | content/browser/browser_url_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698