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

Unified Diff: base/win/resource_util.cc

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/win/resource_util.h ('k') | base/win/scoped_bstr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/resource_util.cc
diff --git a/base/win/resource_util.cc b/base/win/resource_util.cc
deleted file mode 100644
index 0c100785e7bef69a20cd8b8942d9e8693555ba91..0000000000000000000000000000000000000000
--- a/base/win/resource_util.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/logging.h"
-#include "base/win/resource_util.h"
-
-namespace base {
-namespace win {
-
-bool GetResourceFromModule(HMODULE module,
- int resource_id,
- LPCTSTR resource_type,
- void** data,
- size_t* length) {
- if (!module)
- return false;
-
- if (!IS_INTRESOURCE(resource_id)) {
- NOTREACHED();
- return false;
- }
-
- HRSRC hres_info = FindResource(module, MAKEINTRESOURCE(resource_id),
- resource_type);
- if (NULL == hres_info)
- return false;
-
- DWORD data_size = SizeofResource(module, hres_info);
- HGLOBAL hres = LoadResource(module, hres_info);
- if (!hres)
- return false;
-
- void* resource = LockResource(hres);
- if (!resource)
- return false;
-
- *data = resource;
- *length = static_cast<size_t>(data_size);
- return true;
-}
-
-bool GetDataResourceFromModule(HMODULE module,
- int resource_id,
- void** data,
- size_t* length) {
- return GetResourceFromModule(module, resource_id, L"BINDATA", data, length);
-}
-
-} // namespace win
-} // namespace base
« no previous file with comments | « base/win/resource_util.h ('k') | base/win/scoped_bstr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698