Skip to content

Commit de581ca

Browse files
nornagonalexeykuzmin
authored andcommitted
PathService -> base::PathService
1 parent 7092fa3 commit de581ca

17 files changed

+30
-28
lines changed

atom/app/atom_main_delegate_mac.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
GetHelperAppPath(frameworks_path, brightray::GetApplicationName());
5050
if (!base::PathExists(helper_path))
5151
LOG(FATAL) << "Unable to find helper app";
52-
PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
52+
base::PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
5353
}
5454

5555
void AtomMainDelegate::SetUpBundleOverrides() {

atom/browser/api/atom_api_app.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ base::FilePath App::GetPath(mate::Arguments* args, const std::string& name) {
837837
base::FilePath path;
838838
int key = GetPathConstant(name);
839839
if (key >= 0)
840-
succeed = PathService::Get(key, &path);
840+
succeed = base::PathService::Get(key, &path);
841841
if (!succeed)
842842
args->ThrowError("Failed to get '" + name + "' path");
843843
return path;
@@ -854,7 +854,8 @@ void App::SetPath(mate::Arguments* args,
854854
bool succeed = false;
855855
int key = GetPathConstant(name);
856856
if (key >= 0)
857-
succeed = PathService::OverrideAndCreateIfNeeded(key, path, true, false);
857+
succeed =
858+
base::PathService::OverrideAndCreateIfNeeded(key, path, true, false);
858859
if (!succeed)
859860
args->ThrowError("Failed to set path");
860861
}
@@ -886,7 +887,7 @@ bool App::RequestSingleInstanceLock() {
886887
return true;
887888

888889
base::FilePath user_dir;
889-
PathService::Get(brightray::DIR_USER_DATA, &user_dir);
890+
base::PathService::Get(brightray::DIR_USER_DATA, &user_dir);
890891

891892
auto cb = base::Bind(&App::OnSecondInstance, base::Unretained(this));
892893

@@ -935,7 +936,7 @@ bool App::Relaunch(mate::Arguments* js_args) {
935936

936937
if (exec_path.empty()) {
937938
base::FilePath current_exe_path;
938-
PathService::Get(base::FILE_EXE, &current_exe_path);
939+
base::PathService::Get(base::FILE_EXE, &current_exe_path);
939940
argv.push_back(current_exe_path.value());
940941
} else {
941942
argv.push_back(exec_path.value());

atom/browser/atom_browser_client.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches(
312312
// Make sure we're about to launch a known executable
313313
{
314314
base::FilePath child_path;
315-
PathService::Get(content::CHILD_PROCESS_EXE, &child_path);
315+
base::PathService::Get(content::CHILD_PROCESS_EXE, &child_path);
316316

317317
base::ThreadRestrictions::ScopedAllowIO allow_io;
318318
CHECK(base::MakeAbsoluteFilePath(command_line->GetProgram()) == child_path);

atom/browser/atom_browser_context.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void AtomBrowserContext::RegisterPrefs(PrefRegistrySimple* pref_registry) {
108108
pref_registry->RegisterFilePathPref(prefs::kSelectFileLastDirectory,
109109
base::FilePath());
110110
base::FilePath download_dir;
111-
PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &download_dir);
111+
base::PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &download_dir);
112112
pref_registry->RegisterFilePathPref(prefs::kDownloadDefaultDirectory,
113113
download_dir);
114114
pref_registry->RegisterDictionaryPref(prefs::kDevToolsFileSystemPaths);

atom/browser/browser.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void Browser::DidFinishLaunching(const base::DictionaryValue& launch_info) {
152152
// Make sure the userData directory is created.
153153
base::ThreadRestrictions::ScopedAllowIO allow_io;
154154
base::FilePath user_data;
155-
if (PathService::Get(brightray::DIR_USER_DATA, &user_data))
155+
if (base::PathService::Get(brightray::DIR_USER_DATA, &user_data))
156156
base::CreateDirectoryAndGetError(user_data, nullptr);
157157

158158
is_ready_ = true;

atom/browser/browser_win.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ BOOL CALLBACK WindowsEnumerationHandler(HWND hwnd, LPARAM param) {
4545

4646
bool GetProcessExecPath(base::string16* exe) {
4747
base::FilePath path;
48-
if (!PathService::Get(base::FILE_EXE, &path)) {
48+
if (!base::PathService::Get(base::FILE_EXE, &path)) {
4949
LOG(ERROR) << "Error getting app exe path";
5050
return false;
5151
}
@@ -329,7 +329,7 @@ PCWSTR Browser::GetAppUserModelID() {
329329

330330
std::string Browser::GetExecutableFileVersion() const {
331331
base::FilePath path;
332-
if (PathService::Get(base::FILE_EXE, &path)) {
332+
if (base::PathService::Get(base::FILE_EXE, &path)) {
333333
base::ThreadRestrictions::ScopedAllowIO allow_io;
334334
std::unique_ptr<FileVersionInfo> version_info(
335335
FileVersionInfo::CreateFileVersionInfo(path));

atom/browser/relauncher.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ bool RelaunchApp(const StringVector& argv) {
4242
// helper process, because there's no guarantee that the updated version's
4343
// relauncher implementation will be compatible with the running version's.
4444
base::FilePath child_path;
45-
if (!PathService::Get(content::CHILD_PROCESS_EXE, &child_path)) {
45+
if (!base::PathService::Get(content::CHILD_PROCESS_EXE, &child_path)) {
4646
LOG(ERROR) << "No CHILD_PROCESS_EXE";
4747
return false;
4848
}

atom/common/node_bindings.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ std::unique_ptr<const char* []> StringVectorToArgArray(
136136
base::FilePath GetResourcesPath(bool is_browser) {
137137
auto* command_line = base::CommandLine::ForCurrentProcess();
138138
base::FilePath exec_path(command_line->GetProgram());
139-
PathService::Get(base::FILE_EXE, &exec_path);
139+
base::PathService::Get(base::FILE_EXE, &exec_path);
140140

141141
base::FilePath resources_path =
142142
#if defined(OS_MACOSX)
@@ -285,7 +285,7 @@ node::Environment* NodeBindings::CreateEnvironment(
285285
process.Set("_noBrowserGlobals", resources_path);
286286
// The path to helper app.
287287
base::FilePath helper_exec_path;
288-
PathService::Get(content::CHILD_PROCESS_EXE, &helper_exec_path);
288+
base::PathService::Get(content::CHILD_PROCESS_EXE, &helper_exec_path);
289289
process.Set("helperExecPath", helper_exec_path);
290290

291291
return env;

atom/renderer/atom_sandboxed_renderer_client.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ v8::Local<v8::Value> GetBinding(v8::Isolate* isolate,
8383

8484
base::FilePath::StringType GetExecPath() {
8585
base::FilePath path;
86-
PathService::Get(base::FILE_EXE, &path);
86+
base::PathService::Get(base::FILE_EXE, &path);
8787
return path.value();
8888
}
8989

brightray/browser/browser_client.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ NetLog* BrowserClient::GetNetLog() {
115115
base::FilePath BrowserClient::GetDefaultDownloadDirectory() {
116116
// ~/Downloads
117117
base::FilePath path;
118-
if (PathService::Get(base::DIR_HOME, &path))
118+
if (base::PathService::Get(base::DIR_HOME, &path))
119119
path = path.Append(FILE_PATH_LITERAL("Downloads"));
120120

121121
return path;

0 commit comments

Comments
 (0)