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

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

Issue 19052005: Move PathIsWritable, DirectoryExists, ContentsEqual, and TextContentsEqual 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 6
7 #include <lmcons.h> 7 #include <lmcons.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #include <strsafe.h> 10 #include <strsafe.h>
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
304 base::FilePath GetChromeExePath() { 304 base::FilePath GetChromeExePath() {
305 base::FilePath path = ReadPathFromAnyRegistry(kChromeExePathRegValue); 305 base::FilePath path = ReadPathFromAnyRegistry(kChromeExePathRegValue);
306 if (!path.empty()) 306 if (!path.empty())
307 return path; 307 return path;
308 return chrome_launcher_support::GetAnyChromePath(); 308 return chrome_launcher_support::GetAnyChromePath();
309 } 309 }
310 310
311 base::FilePath GetChromeProfilePath() { 311 base::FilePath GetChromeProfilePath() {
312 base::FilePath path = ReadPathFromAnyRegistry(kChromeProfilePathRegValue); 312 base::FilePath path = ReadPathFromAnyRegistry(kChromeProfilePathRegValue);
313 if (!path.empty() && file_util::DirectoryExists(path)) 313 if (!path.empty() && base::DirectoryExists(path))
314 return path; 314 return path;
315 return base::FilePath(); 315 return base::FilePath();
316 } 316 }
317 317
318 BOOL WINAPI Monitor2EnumPorts(HANDLE, 318 BOOL WINAPI Monitor2EnumPorts(HANDLE,
319 wchar_t*, 319 wchar_t*,
320 DWORD level, 320 DWORD level,
321 BYTE* ports, 321 BYTE* ports,
322 DWORD ports_size, 322 DWORD ports_size,
323 DWORD* needed_bytes, 323 DWORD* needed_bytes,
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 SetLastError(ERROR_INVALID_PARAMETER); 637 SetLastError(ERROR_INVALID_PARAMETER);
638 return NULL; 638 return NULL;
639 } 639 }
640 return &cloud_print::g_monitor_2; 640 return &cloud_print::g_monitor_2;
641 } 641 }
642 642
643 MONITORUI* WINAPI InitializePrintMonitorUI(void) { 643 MONITORUI* WINAPI InitializePrintMonitorUI(void) {
644 return &cloud_print::g_monitor_ui; 644 return &cloud_print::g_monitor_ui;
645 } 645 }
646 646
OLDNEW
« no previous file with comments | « cloud_print/virtual_driver/win/install/setup.cc ('k') | cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698