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

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

Issue 5081266177179648: Issue 1104 - Cannot uncheck Disable on website option in tool bar (Closed)
Patch Set: Created Feb. 23, 2015, 12:40 p.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/shared/Utils.h ('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 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 if (!SHGetSpecialFolderPathW(0, pathBuffer.get(), CSIDL_LOCAL_APPDATA, tru e)) 138 if (!SHGetSpecialFolderPathW(0, pathBuffer.get(), CSIDL_LOCAL_APPDATA, tru e))
139 throw std::runtime_error("Unable to find app data directory"); 139 throw std::runtime_error("Unable to find app data directory");
140 appDataPath.assign(pathBuffer.get()); 140 appDataPath.assign(pathBuffer.get());
141 } 141 }
142 appDataPath += L"\\Adblock Plus for IE"; 142 appDataPath += L"\\Adblock Plus for IE";
143 143
144 // Ignore errors here, this isn't a critical operation 144 // Ignore errors here, this isn't a critical operation
145 ::CreateDirectoryW(appDataPath.c_str(), NULL); 145 ::CreateDirectoryW(appDataPath.c_str(), NULL);
146 } 146 }
147 return appDataPath; 147 return appDataPath;
148 } 148 }
149
150 void ReplaceString(std::wstring& input, const std::wstring placeholder, const st d::wstring replacement)
151 {
152 size_t replaceStart = input.find(placeholder);
153 if (replaceStart != std::string::npos)
154 {
155 input.replace(replaceStart, placeholder.length(), replacement);
156 }
157 }
OLDNEW
« src/shared/Utils.h ('K') | « src/shared/Utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld