| 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/web_applications/web_app_mac.h" | 5 #import "chrome/browser/web_applications/web_app_mac.h" |
| 6 | 6 |
| 7 #import <Carbon/Carbon.h> | 7 #import <Carbon/Carbon.h> |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 shortcut_info.profile_path = user_data_dir.Append(profile_base_name); | 495 shortcut_info.profile_path = user_data_dir.Append(profile_base_name); |
| 496 | 496 |
| 497 return shortcut_info; | 497 return shortcut_info; |
| 498 } | 498 } |
| 499 | 499 |
| 500 web_app::ShortcutInfo RecordAppShimErrorAndBuildShortcutInfo( | 500 web_app::ShortcutInfo RecordAppShimErrorAndBuildShortcutInfo( |
| 501 const base::FilePath& bundle_path) { | 501 const base::FilePath& bundle_path) { |
| 502 NSDictionary* plist = ReadPlist(GetPlistPath(bundle_path)); | 502 NSDictionary* plist = ReadPlist(GetPlistPath(bundle_path)); |
| 503 base::Version full_version(base::SysNSStringToUTF8( | 503 base::Version full_version(base::SysNSStringToUTF8( |
| 504 [plist valueForKey:app_mode::kCFBundleShortVersionStringKey])); | 504 [plist valueForKey:app_mode::kCFBundleShortVersionStringKey])); |
| 505 int major_version = 0; | 505 uint32_t major_version = 0; |
| 506 if (full_version.IsValid()) | 506 if (full_version.IsValid()) |
| 507 major_version = full_version.components()[0]; | 507 major_version = full_version.components()[0]; |
| 508 UMA_HISTOGRAM_SPARSE_SLOWLY("Apps.AppShimErrorVersion", major_version); | 508 UMA_HISTOGRAM_SPARSE_SLOWLY("Apps.AppShimErrorVersion", major_version); |
| 509 | 509 |
| 510 return BuildShortcutInfoFromBundle(bundle_path); | 510 return BuildShortcutInfoFromBundle(bundle_path); |
| 511 } | 511 } |
| 512 | 512 |
| 513 void UpdateFileTypes(NSMutableDictionary* plist, | 513 void UpdateFileTypes(NSMutableDictionary* plist, |
| 514 const extensions::FileHandlersInfo& file_handlers_info) { | 514 const extensions::FileHandlersInfo& file_handlers_info) { |
| 515 NSMutableArray* document_types = | 515 NSMutableArray* document_types = |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 web_app::GetShortcutInfoForApp( | 1192 web_app::GetShortcutInfoForApp( |
| 1193 app, | 1193 app, |
| 1194 profile, | 1194 profile, |
| 1195 base::Bind(&web_app::CreateAppShortcutInfoLoaded, | 1195 base::Bind(&web_app::CreateAppShortcutInfoLoaded, |
| 1196 profile, | 1196 profile, |
| 1197 app, | 1197 app, |
| 1198 close_callback)); | 1198 close_callback)); |
| 1199 } | 1199 } |
| 1200 | 1200 |
| 1201 } // namespace chrome | 1201 } // namespace chrome |
| OLD | NEW |