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

Side by Side Diff: chrome/installer/util/installer_util_test_common.cc

Issue 94013004: Add base:: to string16s in chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try again Created 7 years 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/installer/util/installer_state.cc ('k') | chrome/installer/util/l10n_string_util.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/installer/util/installer_util_test_common.h" 5 #include "chrome/installer/util/installer_util_test_common.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 12
13 namespace installer { 13 namespace installer {
14 14
15 namespace test { 15 namespace test {
16 16
17 bool CopyFileHierarchy(const base::FilePath& from, const base::FilePath& to) { 17 bool CopyFileHierarchy(const base::FilePath& from, const base::FilePath& to) {
18 // In SHFILEOPSTRUCT below, |pFrom| and |pTo| have to be double-null 18 // In SHFILEOPSTRUCT below, |pFrom| and |pTo| have to be double-null
19 // terminated: http://msdn.microsoft.com/library/bb759795.aspx 19 // terminated: http://msdn.microsoft.com/library/bb759795.aspx
20 string16 double_null_from(from.value()); 20 base::string16 double_null_from(from.value());
21 double_null_from.push_back(L'\0'); 21 double_null_from.push_back(L'\0');
22 string16 double_null_to(to.value()); 22 base::string16 double_null_to(to.value());
23 double_null_to.push_back(L'\0'); 23 double_null_to.push_back(L'\0');
24 24
25 SHFILEOPSTRUCT file_op = {}; 25 SHFILEOPSTRUCT file_op = {};
26 file_op.wFunc = FO_COPY; 26 file_op.wFunc = FO_COPY;
27 file_op.pFrom = double_null_from.c_str(); 27 file_op.pFrom = double_null_from.c_str();
28 file_op.pTo = double_null_to.c_str(); 28 file_op.pTo = double_null_to.c_str();
29 file_op.fFlags = FOF_NO_UI; 29 file_op.fFlags = FOF_NO_UI;
30 30
31 return (SHFileOperation(&file_op) == 0 && !file_op.fAnyOperationsAborted); 31 return (SHFileOperation(&file_op) == 0 && !file_op.fAnyOperationsAborted);
32 } 32 }
33 33
34 } // namespace test 34 } // namespace test
35 35
36 } // namespace installer 36 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/installer_state.cc ('k') | chrome/installer/util/l10n_string_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698