| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "chrome/browser/mac/dock.h" | 5 #import "chrome/browser/mac/dock.h" |
| 6 | 6 |
| 7 #include <ApplicationServices/ApplicationServices.h> | 7 #include <ApplicationServices/ApplicationServices.h> |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 #include <CoreFoundation/CoreFoundation.h> | 9 #include <CoreFoundation/CoreFoundation.h> |
| 10 #include <signal.h> | 10 #include <signal.h> |
| 11 | 11 |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/mac/foundation_util.h" |
| 13 #include "base/mac/launchd.h" | 14 #include "base/mac/launchd.h" |
| 14 #include "base/mac/mac_logging.h" | 15 #include "base/mac/mac_logging.h" |
| 15 #include "base/mac/mac_util.h" | |
| 16 #include "base/mac/scoped_cftyperef.h" | 16 #include "base/mac/scoped_cftyperef.h" |
| 17 #include "base/mac/scoped_nsautorelease_pool.h" | 17 #include "base/mac/scoped_nsautorelease_pool.h" |
| 18 #include "base/strings/sys_string_conversions.h" | 18 #include "base/strings/sys_string_conversions.h" |
| 19 | 19 |
| 20 extern "C" { | 20 extern "C" { |
| 21 | 21 |
| 22 // Undocumented private internal CFURL functions. The Dock uses these to | 22 // Undocumented private internal CFURL functions. The Dock uses these to |
| 23 // serialize and deserialize CFURLs for use in its plist's file-data keys. See | 23 // serialize and deserialize CFURLs for use in its plist's file-data keys. See |
| 24 // 10.5.8 CF-476.19 and 10.7.2 CF-635.15's CFPriv.h and CFURL.c. The property | 24 // 10.5.8 CF-476.19 and 10.7.2 CF-635.15's CFPriv.h and CFURL.c. The property |
| 25 // list representation will contain, at the very least, the _CFURLStringType | 25 // list representation will contain, at the very least, the _CFURLStringType |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 | 330 |
| 331 // Rewrite the plist. | 331 // Rewrite the plist. |
| 332 [dock_plist setObject:persistent_apps forKey:kDockPersistentAppsKey]; | 332 [dock_plist setObject:persistent_apps forKey:kDockPersistentAppsKey]; |
| 333 [user_defaults setPersistentDomain:dock_plist forName:kDockDomain]; | 333 [user_defaults setPersistentDomain:dock_plist forName:kDockDomain]; |
| 334 | 334 |
| 335 Restart(); | 335 Restart(); |
| 336 return IconAddSuccess; | 336 return IconAddSuccess; |
| 337 } | 337 } |
| 338 | 338 |
| 339 } // namespace dock | 339 } // namespace dock |
| OLD | NEW |