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

Side by Side Diff: src/shared/Utils.cpp

Issue 11276031: FRP wrappers. "Update" menu item. (Closed)
Patch Set: GetAppLocale is now retrieved directly from the browser. Get documentation link change. Manual Upda… Created Aug. 5, 2013, 8:03 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« src/plugin/PluginClass.cpp ('K') | « src/shared/Utils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <memory> 1 #include <memory>
2 #include <stdexcept> 2 #include <stdexcept>
3 #include <vector> 3 #include <vector>
4 4
5 #include <Windows.h> 5 #include <Windows.h>
6 #include <ShlObj.h> 6 #include <ShlObj.h>
7 7
8 #include "Utils.h" 8 #include "Utils.h"
9 9
10 namespace 10 namespace
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 throw std::runtime_error("Unable to find app data directory"); 103 throw std::runtime_error("Unable to find app data directory");
104 appDataPath.assign(pathBuffer.get()); 104 appDataPath.assign(pathBuffer.get());
105 } 105 }
106 appDataPath += L"\\Adblock Plus for IE"; 106 appDataPath += L"\\Adblock Plus for IE";
107 107
108 // Ignore errors here, this isn't a critical operation 108 // Ignore errors here, this isn't a critical operation
109 ::CreateDirectoryW(appDataPath.c_str(), NULL); 109 ::CreateDirectoryW(appDataPath.c_str(), NULL);
110 } 110 }
111 return appDataPath; 111 return appDataPath;
112 } 112 }
113
114 void ReplaceString(std::wstring& input, const std::wstring placeholder, const st d::wstring replacement)
115 {
116 size_t replaceStart = input.find(placeholder);
117 if (replaceStart != std::string::npos)
118 {
119 input.replace(replaceStart, placeholder.length(), replacement);
120 }
121 }
OLDNEW
« src/plugin/PluginClass.cpp ('K') | « src/shared/Utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld