Chromium Code Reviews

Side by Side Diff: chrome/browser/importer/firefox_importer_utils_mac.mm

Issue 160341: First cut at Firefox import on OSX + stubs for Safari import. (Closed)
Patch Set: Address Stuart's comments. Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
(Empty)
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.
4
5 #include <Cocoa/Cocoa.h>
6
7 #include "chrome/browser/importer/firefox_importer_utils.h"
8
9 #include "base/file_util.h"
10
11 FilePath GetProfilesINI() {
12 FilePath ini_file;
13 NSArray* dirs =
14 NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory,
15 NSUserDomainMask, YES);
16 if ([dirs count]) {
17 NSString* app_support_dir = [dirs objectAtIndex:0];
18 NSString* firefox_dir = [app_support_dir
19 stringByAppendingPathComponent:@"Firefox"];
20 NSString* profiles_ini = [firefox_dir
21 stringByAppendingPathComponent:@"profiles.ini"];
22 if (profiles_ini) {
23 ini_file = FilePath([profiles_ini fileSystemRepresentation]);
24 }
25 }
26
27 if (file_util::PathExists(ini_file))
28 return ini_file;
29
30 return FilePath();
31 }
OLDNEW

Powered by Google App Engine