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

Side by Side Diff: chrome/common/pepper_flash.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
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/pepper_flash.h" 5 #include "chrome/common/pepper_flash.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 return false; 86 return false;
87 #endif 87 #endif
88 } 88 }
89 89
90 bool IsPepperFlashEnabledByDefault() { 90 bool IsPepperFlashEnabledByDefault() {
91 #if defined(USE_AURA) 91 #if defined(USE_AURA)
92 // Pepper Flash is required for Aura (on any OS). 92 // Pepper Flash is required for Aura (on any OS).
93 return true; 93 return true;
94 #elif defined(OS_WIN) 94 #elif defined(OS_WIN)
95 // Pepper Flash is required for Windows 8 Metro mode. 95 // Pepper Flash is required for Windows 8 Metro mode.
96 if (base::win::GetMetroModule()) 96 if (base::win::IsMetroProcess())
97 return true; 97 return true;
98 98
99 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); 99 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
100 if (channel == chrome::VersionInfo::CHANNEL_CANARY) 100 if (channel == chrome::VersionInfo::CHANNEL_CANARY)
101 return true; 101 return true;
102 102
103 // For other Windows users, enable only for Dev users in a field trial. 103 // For other Windows users, enable only for Dev users in a field trial.
104 return channel == chrome::VersionInfo::CHANNEL_DEV && IsInFieldTrialGroup(); 104 return channel == chrome::VersionInfo::CHANNEL_DEV && IsInFieldTrialGroup();
105 #elif defined(OS_LINUX) 105 #elif defined(OS_LINUX)
106 // For Linux, always try to use it (availability is checked elsewhere). 106 // For Linux, always try to use it (availability is checked elsewhere).
107 return true; 107 return true;
108 #elif defined(OS_MACOSX) 108 #elif defined(OS_MACOSX)
109 // Don't enable PepperFlash in preference to NPAPI Flash. 109 // Don't enable PepperFlash in preference to NPAPI Flash.
110 return false; 110 return false;
111 #else 111 #else
112 return false; 112 return false;
113 #endif 113 #endif
114 } 114 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698