Skip to content

Commit

Permalink
ifdef OS_NAME -> if defined(OS_NAME)
Browse files Browse the repository at this point in the history
ifndef OS_NAME -> if !defined(OS_NAME)

BUG=none
TEST=no regressions


Review URL: https://chromiumcodereview.appspot.com/12545059

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190069 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
dbeam@chromium.org committed Mar 23, 2013
1 parent 398efe6 commit 3166220
Show file tree
Hide file tree
Showing 26 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion base/message_loop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ MessageLoop::MessageLoop(Type type)
exception_restoration_(false),
message_histogram_(NULL),
run_loop_(NULL),
#ifdef OS_WIN
#if defined(OS_WIN)
os_modal_loop_(false),
#endif // OS_WIN
next_sequence_num_(0) {
Expand Down
2 changes: 1 addition & 1 deletion base/path_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "base/path_service.h"

#ifdef OS_WIN
#if defined(OS_WIN)
#include <windows.h>
#include <shellapi.h>
#include <shlobj.h>
Expand Down
2 changes: 1 addition & 1 deletion base/rand_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ BASE_EXPORT void RandBytes(void* output, size_t output_length);
// See crypto/ for cryptographically secure random number generation APIs.
BASE_EXPORT std::string RandBytesAsString(size_t length);

#ifdef OS_POSIX
#if defined(OS_POSIX)
BASE_EXPORT int GetUrandomFD();
#endif

Expand Down
2 changes: 1 addition & 1 deletion cc/output/software_renderer_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ TEST_F(SoftwareRendererTest, solidColorQuad)
// Yellow: expects 0xFFFFFF00, was 0xFF00FFFF on android.
// Cyan: expects 0xFF00FFFF, was 0xFFFFFF00 on android.
// http://crbug.com/154528
#ifndef OS_ANDROID
#if !defined(OS_ANDROID)
EXPECT_EQ(SK_ColorYELLOW, pixels[0]);
EXPECT_EQ(SK_ColorYELLOW, pixels[outerPixels - 1]);
EXPECT_EQ(SK_ColorCYAN, pixels[outerSize.width() + 1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void CreateTestNativeHostManifest(base::FilePath manifest_path) {
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_user_data_dir));
test_user_data_dir = test_user_data_dir.AppendASCII("native_messaging");
test_user_data_dir = test_user_data_dir.AppendASCII("native_hosts");
#ifdef OS_POSIX
#if defined(OS_POSIX)
base::FilePath host_path = test_user_data_dir.AppendASCII("echo.py");
#else
base::FilePath host_path = test_user_data_dir.AppendASCII("echo.bat");
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/importer/firefox_importer_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ TEST_F(FirefoxProfileImporterTest, MAYBE_IMPORTER(Firefox35Importer)) {
TEST(FirefoxImporterTest, MAYBE_NSS(Firefox2NSS3Decryptor)) {
base::FilePath nss_path;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &nss_path));
#ifdef OS_MACOSX
#if defined(OS_MACOSX)
nss_path = nss_path.AppendASCII("firefox2_nss_mac");
#else
nss_path = nss_path.AppendASCII("firefox2_nss");
Expand All @@ -523,7 +523,7 @@ TEST(FirefoxImporterTest, MAYBE_NSS(Firefox2NSS3Decryptor)) {
TEST(FirefoxImporterTest, MAYBE_NSS(Firefox3NSS3Decryptor)) {
base::FilePath nss_path;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &nss_path));
#ifdef OS_MACOSX
#if defined(OS_MACOSX)
nss_path = nss_path.AppendASCII("firefox3_nss_mac");
#else
nss_path = nss_path.AppendASCII("firefox3_nss");
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/managed_mode/managed_user_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ bool ManagedUserService::UserMayLoad(const extensions::Extension* extension,

if (extension) {
bool was_installed_by_default = extension->was_installed_by_default();
#ifdef OS_CHROMEOS
#if defined(OS_CHROMEOS)
// On Chrome OS all external sources are controlled by us so it means that
// they are "default". Method was_installed_by_default returns false because
// extensions creation flags are ignored in case of default extensions with
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/printing/print_dialog_cloud.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ bool GetPageSetupParameters(const std::string& json,

string16 GetSwitchValueString16(const CommandLine& command_line,
const char* switchName) {
#ifdef OS_WIN
#if defined(OS_WIN)
CommandLine::StringType native_switch_val;
native_switch_val = command_line.GetSwitchValueNative(switchName);
return string16(native_switch_val);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "ppapi/proxy/resource_message_params.h"
#include "ppapi/shared_impl/time_conversion.h"

#ifdef OS_WIN
#if defined(OS_WIN)
#include <windows.h>
#elif defined(OS_MACOSX)
#include <CoreServices/CoreServices.h>
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/ash/screenshot_taker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void SaveScreenshot(const base::FilePath& screenshot_path,
}

// TODO(kinaba): crbug.com/140425, remove this ungly #ifdef dispatch.
#ifdef OS_CHROMEOS
#if defined(OS_CHROMEOS)
void SaveScreenshotToDrive(scoped_refptr<base::RefCountedBytes> png_data,
drive::DriveFileError error,
const base::FilePath& local_path) {
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/ui/webui/flags_ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ FlagsUI::FlagsUI(content::WebUI* web_ui)
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
Profile* profile = Profile::FromWebUI(web_ui);

#ifdef OS_CHROMEOS
#if defined(OS_CHROMEOS)
chromeos::DeviceSettingsService::Get()->GetOwnershipStatusAsync(
base::Bind(&FlagsUI::FinishInitialization,
weak_factory_.GetWeakPtr(), profile));
Expand Down Expand Up @@ -203,7 +203,7 @@ void FlagsUI::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterListPref(prefs::kEnabledLabsExperiments);
}

#ifdef OS_CHROMEOS
#if defined(OS_CHROMEOS)
// static
void FlagsUI::RegisterUserPrefs(PrefRegistrySyncable* registry) {
registry->RegisterListPref(prefs::kEnabledLabsExperiments,
Expand Down
6 changes: 3 additions & 3 deletions chrome/browser/ui/webui/flags_ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "content/public/browser/web_ui_controller.h"
#include "ui/base/layout.h"

#ifdef OS_CHROMEOS
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/settings/device_settings_service.h"
#endif

Expand All @@ -29,12 +29,12 @@ class FlagsUI : public content::WebUIController {
static base::RefCountedMemory* GetFaviconResourceBytes(
ui::ScaleFactor scale_factor);
static void RegisterPrefs(PrefRegistrySimple* registry);
#ifdef OS_CHROMEOS
#if defined(OS_CHROMEOS)
static void RegisterUserPrefs(PrefRegistrySyncable* registry);
#endif

private:
#ifdef OS_CHROMEOS
#if defined(OS_CHROMEOS)
// On ChromeOS verifying if the owner is signed in is async operation and only
// after finishing it the UI can be properly populated. This function is the
// callback for whether the owner is signed in. It will respectively pick the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void PrintToPdfCallback(Metafile* metafile, const base::FilePath& path) {
base::Bind(&base::DeletePointer<Metafile>, metafile));
}

#ifdef OS_CHROMEOS
#if defined(OS_CHROMEOS)
void PrintToPdfCallbackWithCheck(Metafile* metafile,
drive::DriveFileError error,
const base::FilePath& path) {
Expand Down Expand Up @@ -915,7 +915,7 @@ void PrintPreviewHandler::PostPrintToPdfTask() {
printing::PreviewMetafile* metafile = new printing::PreviewMetafile;
metafile->InitFromData(static_cast<const void*>(data->front()), data->size());
// PrintToPdfCallback takes ownership of |metafile|.
#ifdef OS_CHROMEOS
#if defined(OS_CHROMEOS)
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
drive::util::PrepareWritableFileAndRun(
Profile::FromBrowserContext(preview_web_contents()->GetBrowserContext()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ std::string ProfileSigninConfirmationDialog::GetDialogArgs() const {
DictionaryValue dict;
dict.SetString("username", username_);
dict.SetBoolean("promptForNewProfile", prompt_for_new_profile_);
#ifdef OS_WIN
#if defined(OS_WIN)
dict.SetBoolean("hideTitle", true);
#endif
base::JSONWriter::Write(&dict, &data);
Expand Down
2 changes: 1 addition & 1 deletion content/browser/download/download_item_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ bool DownloadItemImpl::GetFileExternallyRemoved() const {
}

bool DownloadItemImpl::IsDangerous() const {
#ifdef OS_WIN
#if defined(OS_WIN)
// TODO(noelutz): At this point only the windows views UI supports
// warnings based on dangerous content.
return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE ||
Expand Down
2 changes: 1 addition & 1 deletion content/browser/plugin_data_remover_impl_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class PluginDataRemoverTest : public ContentBrowserTest {
}

virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
#ifdef OS_MACOSX
#if defined(OS_MACOSX)
base::FilePath browser_directory;
PathService::Get(base::DIR_MODULE, &browser_directory);
command_line->AppendSwitchPath(switches::kExtraPluginDir,
Expand Down
2 changes: 1 addition & 1 deletion content/browser/plugin_service_impl_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class PluginServiceTest : public ContentBrowserTest {
}

virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
#ifdef OS_MACOSX
#if defined(OS_MACOSX)
base::FilePath browser_directory;
PathService::Get(base::DIR_MODULE, &browser_directory);
command_line->AppendSwitchPath(switches::kExtraPluginDir,
Expand Down
2 changes: 1 addition & 1 deletion content/test/webrtc_audio_device_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ std::string WebRTCAudioDeviceTest::GetTestDataPath(
EXPECT_TRUE(PathService::Get(DIR_TEST_DATA, &path));
path = path.Append(file_name);
EXPECT_TRUE(file_util::PathExists(path));
#ifdef OS_WIN
#if defined(OS_WIN)
return WideToUTF8(path.value());
#else
return path.value();
Expand Down
2 changes: 1 addition & 1 deletion courgette/memory_allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "base/file_util.h"
#include "base/stringprintf.h"

#ifdef OS_WIN
#if defined(OS_WIN)

namespace courgette {

Expand Down
2 changes: 1 addition & 1 deletion courgette/memory_allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ typedef bool CheckBool;

namespace courgette {

#ifdef OS_WIN
#if defined(OS_WIN)

// Manages a temporary file. The file is created in the %TEMP% folder and
// is deleted when the file handle is closed.
Expand Down
2 changes: 1 addition & 1 deletion gpu/command_buffer/tests/occlusion_query_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void OcclusionQueryTest::DrawRect(float x, float z, float scale, float* color) {
}

TEST_F(OcclusionQueryTest, Occlusion) {
#ifdef OS_MACOSX
#if defined(OS_MACOSX)
EXPECT_TRUE(GLTestHelper::HasExtension("GL_EXT_occlusion_query_boolean"))
<< "GL_EXT_occlusion_query_boolean is required on OSX";
#endif
Expand Down
2 changes: 1 addition & 1 deletion tools/metrics/testdata/foo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#if !defined(OS_CAT)

#ifdef OS_WIN
#if defined(OS_WIN)

#endif // !OS_ANDROID && !OS_IOS
#endif // OS_CAT
Expand Down
2 changes: 1 addition & 1 deletion tools/metrics/testdata/foo_ignored.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if defined(OS_ANDROID)

#ifdef OS_WIN
#if defined(OS_WIN)

2 changes: 1 addition & 1 deletion tools/metrics/testdata/subdir/foo_test.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

#if defined(OS_ANDROID)

#ifdef OS_WIN
#if defined(OS_WIN)

8 changes: 4 additions & 4 deletions webkit/plugins/npapi/test/plugin_get_javascript_url_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ExecuteGetJavascriptUrlTest::ExecuteGetJavascriptUrlTest(
NPP id, NPNetscapeFuncs *host_functions)
: PluginTest(id, host_functions),
test_started_(false),
#ifdef OS_WIN
#if defined(OS_WIN)
window_(NULL),
#endif
npn_evaluate_context_(false) {
Expand All @@ -46,7 +46,7 @@ NPError ExecuteGetJavascriptUrlTest::SetWindow(NPWindow* pNPWindow) {
reinterpret_cast<void*>(SELF_URL_STREAM_ID));
test_started_ = true;

#ifdef OS_WIN
#if defined(OS_WIN)
HWND window_handle = reinterpret_cast<HWND>(pNPWindow->window);
if (!::GetProp(window_handle, L"Plugin_Instance")) {
// TODO: this propery leaks.
Expand All @@ -64,7 +64,7 @@ NPError ExecuteGetJavascriptUrlTest::SetWindow(NPWindow* pNPWindow) {
return NPERR_NO_ERROR;
}

#ifdef OS_WIN
#if defined(OS_WIN)
void CALLBACK ExecuteGetJavascriptUrlTest::TimerProc(
HWND window, UINT message, UINT_PTR timer_id, DWORD elapsed_time) {
ExecuteGetJavascriptUrlTest* this_instance =
Expand Down Expand Up @@ -171,7 +171,7 @@ NPError ExecuteGetJavascriptUrlTest::DestroyStream(NPStream *stream,
return NPERR_INVALID_PARAM;
}

#ifdef OS_WIN
#if defined(OS_WIN)
KillTimer(window_, kNPNEvaluateTimerID);
#endif

Expand Down
4 changes: 2 additions & 2 deletions webkit/plugins/npapi/webplugin_delegate_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void WebPluginDelegateImpl::SetFocus(bool focused) {
// mode when it loses focus, and its full screen window causes the browser to
// lose focus.
has_webkit_focus_ = focused;
#ifndef OS_WIN
#if !defined(OS_WIN)
if (containing_view_has_focus_)
SetPluginHasFocus(focused);
#else
Expand All @@ -176,7 +176,7 @@ void WebPluginDelegateImpl::SetContentAreaHasFocus(bool has_focus) {
containing_view_has_focus_ = has_focus;
if (!windowless_)
return;
#ifndef OS_WIN // See SetFocus above.
#if !defined(OS_WIN) // See SetFocus above.
SetPluginHasFocus(containing_view_has_focus_ && has_webkit_focus_);
#endif
}
Expand Down

0 comments on commit 3166220

Please sign in to comment.