Skip to content

Commit

Permalink
[iOS] Upstream consumer API.
Browse files Browse the repository at this point in the history
BUG=517446

Review URL: https://codereview.chromium.org/1565933002

Cr-Commit-Position: refs/heads/master@{#368043}
  • Loading branch information
sdefresne authored and Commit bot committed Jan 7, 2016
1 parent 4662d4f commit a0f0b60
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ios/consumer/base/DEPS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include_rules = [
"+ios/public/consumer/base",
]
14 changes: 14 additions & 0 deletions ios/consumer/base/debugger.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/debug/debugger.h"
#include "ios/public/consumer/base/debugger.h"

namespace ios {

bool BeingDebugged() {
return base::debug::BeingDebugged();
}

} // namespace ios
24 changes: 24 additions & 0 deletions ios/consumer/ios_consumer_base.gyp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
},
'targets': [
{
'target_name': 'ios_consumer_base',
'type': 'static_library',
'dependencies': [
'../../base/base.gyp:base',
],
'include_dirs': [
'../..',
],
'sources': [
'../public/consumer/base/debugger.h',
'base/debugger.mm',
],
},
],
}
1 change: 1 addition & 0 deletions ios/ios.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
'dependencies': [
'chrome/ios_chrome_tests.gyp:*',
'chrome/ios_today_extension_resources.gyp:*',
'consumer/ios_consumer_base.gyp:*',
'crnet/crnet.gyp:*',
'crnet/crnet_consumer/crnet_consumer.gyp:*',
'crnet/crnet_pack.gyp:*',
Expand Down
2 changes: 2 additions & 0 deletions ios/public/consumer/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sdefresne@chromium.org
stuartmorgan@chromium.org
4 changes: 4 additions & 0 deletions ios/public/consumer/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This directory exists to allow Chrome on iOS downstream code to call into
Chromium code in a way that makes it visible in the upstream repository.
It is currently a proof-of-concept but can be extended when/if the time
comes.
15 changes: 15 additions & 0 deletions ios/public/consumer/base/debugger.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef IOS_PUBLIC_CONSUMER_BASE_DEBUGGER_H_
#define IOS_PUBLIC_CONSUMER_BASE_DEBUGGER_H_

namespace ios {

// Returns true if the given process is being run under a debugger.
bool BeingDebugged();

} // namespace ios

#endif // IOS_PUBLIC_CONSUMER_BASE_DEBUGGER_H_

0 comments on commit a0f0b60

Please sign in to comment.