Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: src/shared/Utils.cpp

Issue 10836037: Share code for data path retrieval in engine and plugin (Closed)
Left Patch Set: Created June 4, 2013, 9:54 a.m.
Right Patch Set: Fixed nit Created June 4, 2013, 10:38 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/shared/Utils.h ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #include "stdafx.h" 1 #include <Windows.h>
2 #include <ShlObj.h>
3
2 #include "Utils.h" 4 #include "Utils.h"
3 5
4 namespace 6 namespace
5 { 7 {
6 std::wstring appDataPath; 8 std::wstring appDataPath;
7 9
8 bool IsWindowsVistaOrLater() 10 bool IsWindowsVistaOrLater()
9 { 11 {
10 OSVERSIONINFOEX osvi; 12 OSVERSIONINFOEX osvi;
11 ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); 13 ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
(...skipping 22 matching lines...) Expand all
34 throw std::runtime_error("Unable to find app data directory"); 36 throw std::runtime_error("Unable to find app data directory");
35 appDataPath.assign(pathBuffer.get()); 37 appDataPath.assign(pathBuffer.get());
36 } 38 }
37 appDataPath += L"\\Adblock Plus for IE"; 39 appDataPath += L"\\Adblock Plus for IE";
38 40
39 // Ignore errors here, this isn't a critical operation 41 // Ignore errors here, this isn't a critical operation
40 ::CreateDirectoryW(appDataPath.c_str(), NULL); 42 ::CreateDirectoryW(appDataPath.c_str(), NULL);
41 } 43 }
42 return appDataPath; 44 return appDataPath;
43 } 45 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld