Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1459)

Side by Side Diff: chrome/browser/web_applications/web_app_mac.mm

Issue 985573003: Support 32-bit subversion fields in base::Version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a static assert Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc ('k') | chrome/installer/setup/install_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698