summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorgregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-18 13:04:16 +0000
committergregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-18 13:04:16 +0000
commit6534175fbe31f9affae0df26565577ad805ac5d4 (patch)
tree0478a706c1653483276e1f2a9f6e3f6dd76f863c /app
parent923f9a87770ee80ae72548b75c80f106339ba7d8 (diff)
downloadchromium_src-6534175fbe31f9affae0df26565577ad805ac5d4.zip
chromium_src-6534175fbe31f9affae0df26565577ad805ac5d4.tar.gz
chromium_src-6534175fbe31f9affae0df26565577ad805ac5d4.tar.bz2
Split win_util.cc - we need ConvertToLongPath in the 64-bit Windows build, but would like to avoid the dependencies that would be added by including the whole win_util.cc file
Review URL: http://codereview.chromium.org/536028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36494 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/app_base.gypi1
-rw-r--r--app/win_util.cc13
-rw-r--r--app/win_util_path.cc22
3 files changed, 23 insertions, 13 deletions
diff --git a/app/app_base.gypi b/app/app_base.gypi
index f0aacef..a0a7544 100644
--- a/app/app_base.gypi
+++ b/app/app_base.gypi
@@ -40,6 +40,7 @@
'sources': [
'win_util.cc',
'win_util.h',
+ 'win_util_path.cc',
],
}],
['OS!="linux"', {
diff --git a/app/win_util.cc b/app/win_util.cc
index 9e1587e..4ad8b27 100644
--- a/app/win_util.cc
+++ b/app/win_util.cc
@@ -132,19 +132,6 @@ std::wstring FormatSystemDate(const SYSTEMTIME& date,
return output;
}
-bool ConvertToLongPath(const std::wstring& short_path,
- std::wstring* long_path) {
- wchar_t long_path_buf[MAX_PATH];
- DWORD return_value = GetLongPathName(short_path.c_str(), long_path_buf,
- MAX_PATH);
- if (return_value != 0 && return_value < MAX_PATH) {
- *long_path = long_path_buf;
- return true;
- }
-
- return false;
-}
-
bool IsDoubleClick(const POINT& origin,
const POINT& current,
DWORD elapsed_time) {
diff --git a/app/win_util_path.cc b/app/win_util_path.cc
new file mode 100644
index 0000000..5717f4e
--- /dev/null
+++ b/app/win_util_path.cc
@@ -0,0 +1,22 @@
+// Copyright (c) 2009 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 "app/win_util.h"
+
+namespace win_util {
+
+bool ConvertToLongPath(const std::wstring& short_path,
+ std::wstring* long_path) {
+ wchar_t long_path_buf[MAX_PATH];
+ DWORD return_value = GetLongPathName(short_path.c_str(), long_path_buf,
+ MAX_PATH);
+ if (return_value != 0 && return_value < MAX_PATH) {
+ *long_path = long_path_buf;
+ return true;
+ }
+
+ return false;
+}
+
+} // namespace win_util