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

Side by Side Diff: chrome/common/extensions/extension.cc

Issue 10560015: Implement base::win::IsMetroProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_paths_win.cc ('k') | chrome/common/pepper_flash.cc » ('j') | 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) 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 #include "chrome/common/extensions/extension.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 } 1517 }
1518 1518
1519 #if defined(OS_CHROMEOS) 1519 #if defined(OS_CHROMEOS)
1520 // We don't allow extension plugins to run on Chrome OS. We still 1520 // We don't allow extension plugins to run on Chrome OS. We still
1521 // parse the manifest entry so that error messages are consistently 1521 // parse the manifest entry so that error messages are consistently
1522 // displayed across platforms. 1522 // displayed across platforms.
1523 #else 1523 #else
1524 #if defined(OS_WIN) 1524 #if defined(OS_WIN)
1525 // Like Chrome OS, we don't support NPAPI plugins in Windows 8 metro mode 1525 // Like Chrome OS, we don't support NPAPI plugins in Windows 8 metro mode
1526 // but in this case we want to fail with an error. 1526 // but in this case we want to fail with an error.
1527 if (base::win::GetMetroModule()) { 1527 if (base::win::IsMetroProcess()) {
1528 *error = l10n_util::GetStringUTF16( 1528 *error = l10n_util::GetStringUTF16(
1529 IDS_EXTENSION_INSTALL_PLUGIN_NOT_SUPPORTED); 1529 IDS_EXTENSION_INSTALL_PLUGIN_NOT_SUPPORTED);
1530 return false; 1530 return false;
1531 } 1531 }
1532 #endif // defined(OS_WIN). 1532 #endif // defined(OS_WIN).
1533 plugins_.push_back(PluginInfo()); 1533 plugins_.push_back(PluginInfo());
1534 plugins_.back().path = path().Append(FilePath::FromUTF8Unsafe(path_str)); 1534 plugins_.back().path = path().Append(FilePath::FromUTF8Unsafe(path_str));
1535 plugins_.back().is_public = is_public; 1535 plugins_.back().is_public = is_public;
1536 #endif // defined(OS_CHROMEOS). 1536 #endif // defined(OS_CHROMEOS).
1537 } 1537 }
(...skipping 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after
3797 3797
3798 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 3798 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
3799 const Extension* extension, 3799 const Extension* extension,
3800 const ExtensionPermissionSet* permissions, 3800 const ExtensionPermissionSet* permissions,
3801 Reason reason) 3801 Reason reason)
3802 : reason(reason), 3802 : reason(reason),
3803 extension(extension), 3803 extension(extension),
3804 permissions(permissions) {} 3804 permissions(permissions) {}
3805 3805
3806 } // namespace extensions 3806 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths_win.cc ('k') | chrome/common/pepper_flash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698