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

Side by Side Diff: cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc

Issue 16950028: Move file_util::Delete to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 "cloud_print/virtual_driver/win/port_monitor/port_monitor.h" 5 #include "cloud_print/virtual_driver/win/port_monitor/port_monitor.h"
6 #include <winspool.h> 6 #include <winspool.h>
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/win/registry.h" 10 #include "base/win/registry.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 base::FilePath main_path = path.Append(kChromeExePath); 67 base::FilePath main_path = path.Append(kChromeExePath);
68 ASSERT_TRUE(file_util::CreateDirectory(main_path)); 68 ASSERT_TRUE(file_util::CreateDirectory(main_path));
69 base::FilePath alternate_path = path.Append(kAlternateChromeExePath); 69 base::FilePath alternate_path = path.Append(kAlternateChromeExePath);
70 ASSERT_TRUE(file_util::CreateDirectory(alternate_path)); 70 ASSERT_TRUE(file_util::CreateDirectory(alternate_path));
71 } 71 }
72 72
73 virtual void DeleteTempChromeExeFiles() { 73 virtual void DeleteTempChromeExeFiles() {
74 base::FilePath path; 74 base::FilePath path;
75 PathService::Get(base::DIR_LOCAL_APP_DATA, &path); 75 PathService::Get(base::DIR_LOCAL_APP_DATA, &path);
76 base::FilePath main_path = path.Append(kChromeExePath); 76 base::FilePath main_path = path.Append(kChromeExePath);
77 ASSERT_TRUE(file_util::Delete(main_path, true)); 77 ASSERT_TRUE(base::Delete(main_path, true));
78 PathService::Get(base::DIR_LOCAL_APP_DATA, &path); 78 PathService::Get(base::DIR_LOCAL_APP_DATA, &path);
79 base::FilePath alternate_path = path.Append(kAlternateChromeExePath); 79 base::FilePath alternate_path = path.Append(kAlternateChromeExePath);
80 ASSERT_TRUE(file_util::Delete(alternate_path, true)); 80 ASSERT_TRUE(base::Delete(alternate_path, true));
81 } 81 }
82 82
83 protected: 83 protected:
84 virtual void SetUp() { 84 virtual void SetUp() {
85 SetUpChromeExeRegistry(); 85 SetUpChromeExeRegistry();
86 } 86 }
87 87
88 virtual void TearDown() { 88 virtual void TearDown() {
89 DeleteChromeExeRegistry(); 89 DeleteChromeExeRegistry();
90 } 90 }
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 EXPECT_TRUE(monitor2->pfnEndDocPort(port_handle)); 265 EXPECT_TRUE(monitor2->pfnEndDocPort(port_handle));
266 RevertToSelf(); 266 RevertToSelf();
267 EXPECT_TRUE(monitor2->pfnClosePort != NULL); 267 EXPECT_TRUE(monitor2->pfnClosePort != NULL);
268 EXPECT_TRUE(monitor2->pfnClosePort(port_handle)); 268 EXPECT_TRUE(monitor2->pfnClosePort(port_handle));
269 // Shutdown the port monitor. 269 // Shutdown the port monitor.
270 Monitor2Shutdown(monitor_handle); 270 Monitor2Shutdown(monitor_handle);
271 } 271 }
272 272
273 } // namespace cloud_print 273 } // namespace cloud_print
274 274
OLDNEW
« no previous file with comments | « cloud_print/virtual_driver/win/port_monitor/port_monitor.cc ('k') | components/visitedlink/test/visitedlink_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698