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

Side by Side Diff: chrome/browser/resources/ntp/util.js

Issue 2805097: Fixes the regex used to test for the Mac platform. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // TODO(arv): Move to shared/js once namespaced and tested. 5 // TODO(arv): Move to shared/js once namespaced and tested.
6 6
7 var global = this; 7 var global = this;
8 const IS_MAC = /$Mac/.test(navigator.platform); 8 const IS_MAC = /^Mac/.test(navigator.platform);
9 9
10 function $(id) { 10 function $(id) {
11 return document.getElementById(id); 11 return document.getElementById(id);
12 } 12 }
13 13
14 function bind(fn, selfObj, var_args) { 14 function bind(fn, selfObj, var_args) {
15 var boundArgs = Array.prototype.slice.call(arguments, 2); 15 var boundArgs = Array.prototype.slice.call(arguments, 2);
16 return function() { 16 return function() {
17 var args = Array.prototype.slice.call(arguments); 17 var args = Array.prototype.slice.call(arguments);
18 args.unshift.apply(args, boundArgs); 18 args.unshift.apply(args, boundArgs);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // restore 77 // restore
78 global[callbackName] = old; 78 global[callbackName] = old;
79 79
80 var args = Array.prototype.slice.call(arguments); 80 var args = Array.prototype.slice.call(arguments);
81 return callback.apply(global, args); 81 return callback.apply(global, args);
82 }; 82 };
83 chrome.send(name, params); 83 chrome.send(name, params);
84 } 84 }
85 85
86 86
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698