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

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

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 cloud_print::kCloudPrintRegKey, 58 cloud_print::kCloudPrintRegKey,
59 KEY_ALL_ACCESS); 59 KEY_ALL_ACCESS);
60 key.DeleteValue(cloud_print::kChromeExePathRegValue); 60 key.DeleteValue(cloud_print::kChromeExePathRegValue);
61 key.DeleteValue(cloud_print::kChromeProfilePathRegValue); 61 key.DeleteValue(cloud_print::kChromeProfilePathRegValue);
62 } 62 }
63 63
64 virtual void CreateTempChromeExeFiles() { 64 virtual void CreateTempChromeExeFiles() {
65 base::FilePath path; 65 base::FilePath path;
66 PathService::Get(base::DIR_LOCAL_APP_DATA, &path); 66 PathService::Get(base::DIR_LOCAL_APP_DATA, &path);
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(base::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(base::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(base::DeleteFile(main_path, true)); 77 ASSERT_TRUE(base::DeleteFile(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(base::DeleteFile(alternate_path, true)); 80 ASSERT_TRUE(base::DeleteFile(alternate_path, true));
(...skipping 184 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/breakpad/tools/crash_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698