Don't compile save_password_infobar_delegate.cc everywhere but Mac and Android
[chromium-blink-merge.git] / chrome / common / importer / firefox_importer_utils_linux.cc
blob73ff81e73e4c250f5987c97b9416024c58c53989
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/common/importer/firefox_importer_utils.h"
7 #include "base/base_paths.h"
8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h"
10 #include "base/path_service.h"
12 base::FilePath GetProfilesINI() {
13 base::FilePath ini_file;
14 // The default location of the profile folder containing user data is
15 // under user HOME directory in .mozilla/firefox folder on Linux.
16 base::FilePath home;
17 PathService::Get(base::DIR_HOME, &home);
18 if (!home.empty()) {
19 ini_file = home.Append(".mozilla/firefox/profiles.ini");
21 if (base::PathExists(ini_file))
22 return ini_file;
24 return base::FilePath();