Skip to content

Commit

Permalink
Move dns API to dev channel
Browse files Browse the repository at this point in the history
BUG=278546

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221729 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
sanjoy.pal@samsung.com committed Sep 6, 2013
1 parent 3dfd4ac commit aa27da1
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 21 deletions.
6 changes: 3 additions & 3 deletions chrome/browser/extensions/api/dns/dns_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/api/dns/host_resolver_wrapper.h"
#include "chrome/browser/io_thread.h"
#include "chrome/common/extensions/api/experimental_dns.h"
#include "chrome/common/extensions/api/dns.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/host_port_pair.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"

using content::BrowserThread;
using extensions::api::experimental_dns::ResolveCallbackResolveInfo;
using extensions::api::dns::ResolveCallbackResolveInfo;

namespace Resolve = extensions::api::experimental_dns::Resolve;
namespace Resolve = extensions::api::dns::Resolve;

namespace extensions {

Expand Down
3 changes: 1 addition & 2 deletions chrome/browser/extensions/api/dns/dns_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ namespace extensions {

class DnsResolveFunction : public AsyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("experimental.dns.resolve",
EXPERIMENTAL_DNS_RESOLVE)
DECLARE_EXTENSION_FUNCTION("dns.resolve", DNS_RESOLVE)

DnsResolveFunction();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ enum HistogramValue {
METRICSPRIVATE_RECORDSMALLCOUNT,
APP_CURRENTWINDOWINTERNAL_MINIMIZE,
DEVELOPERPRIVATE_AUTOUPDATE,
EXPERIMENTAL_DNS_RESOLVE,
DNS_RESOLVE,
DELETED_EXPERIMENTAL_SYSTEMINFO_MEMORY_GET,
HISTORY_ADDURL,
TABS_GET,
Expand Down
8 changes: 4 additions & 4 deletions chrome/common/extensions/api/_api_features.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@
"dependencies": ["permission:dial"],
"contexts": ["blessed_extension"]
},
"dns": {
"dependencies": ["permission:dns"],
"contexts": ["blessed_extension"]
},
"downloads": {
"dependencies": ["permission:downloads"],
"contexts": ["blessed_extension"]
Expand Down Expand Up @@ -197,10 +201,6 @@
"dependencies": ["permission:experimental"],
"contexts": ["blessed_extension"]
},
"experimental.dns": {
"dependencies": ["permission:experimental"],
"contexts": ["blessed_extension"]
},
"experimental.history": {
"dependencies": ["permission:history", "permission:experimental"],
"contexts": ["blessed_extension"]
Expand Down
4 changes: 4 additions & 0 deletions chrome/common/extensions/api/_permission_features.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@
"whitelist": ["80B9DC58E5210749F052F5B4DB239C50CF72AEB6"]
}
],
"dns": {
"channel": "dev",
"extension_types": ["extension", "platform_app"]
},
"downloads": {
"channel": "beta",
"extension_types": ["extension"]
Expand Down
2 changes: 1 addition & 1 deletion chrome/common/extensions/api/api.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
'desktop_capture.idl',
'diagnostics.idl',
'dial.idl',
'dns.idl',
'downloads.idl',
'echo_private.json',
'downloads_internal.idl',
'enterprise_platform_keys_private.json',
'events.json',
'experimental_accessibility.json',
'experimental_discovery.idl',
'experimental_dns.idl',
'experimental_history.json',
'experimental_identity.idl',
'experimental_idltest.idl',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// 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.

// Experimental.dns.
namespace experimental.dns {
namespace dns {

dictionary ResolveCallbackResolveInfo {
// The result code. Zero indicates success.
Expand Down
4 changes: 2 additions & 2 deletions chrome/common/extensions/api/extension_api_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ TEST(ExtensionAPITest, LazyGetSchema) {
EXPECT_EQ(NULL, apis->GetSchema("foo"));
EXPECT_EQ(NULL, apis->GetSchema("foo"));

EXPECT_TRUE(apis->GetSchema("experimental.dns"));
EXPECT_TRUE(apis->GetSchema("experimental.dns"));
EXPECT_TRUE(apis->GetSchema("dns"));
EXPECT_TRUE(apis->GetSchema("dns"));
EXPECT_TRUE(apis->GetSchema("extension"));
EXPECT_TRUE(apis->GetSchema("extension"));
EXPECT_TRUE(apis->GetSchema("infobars"));
Expand Down
1 change: 1 addition & 0 deletions chrome/common/extensions/permissions/api_permission.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class APIPermission {
kDesktopCapture,
kDeveloperPrivate,
kDevtools,
kDns,
kDownloads,
kDownloadsInternal,
kDownloadsOpen,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ std::vector<APIPermissionInfo*> ChromeAPIPermissions::GetAllPermissions()
APIPermissionInfo::kFlagNone,
IDS_EXTENSION_PROMPT_WARNING_DESKTOP_CAPTURE,
PermissionMessage::kDesktopCapture },
{ APIPermission::kDns, "dns" },
{ APIPermission::kDownloads, "downloads", APIPermissionInfo::kFlagNone,
IDS_EXTENSION_PROMPT_WARNING_DOWNLOADS,
PermissionMessage::kDownloads },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ TEST(PermissionsTest, PermissionMessages) {
skip.insert(APIPermission::kBrowsingData);
skip.insert(APIPermission::kContextMenus);
skip.insert(APIPermission::kDiagnostics);
skip.insert(APIPermission::kDns);
skip.insert(APIPermission::kDownloadsShelf);
skip.insert(APIPermission::kFontSettings);
skip.insert(APIPermission::kFullscreen);
Expand Down
6 changes: 3 additions & 3 deletions chrome/test/data/extensions/api_test/dns/api/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var testIPLiteralResolution = function() {
chrome.test.assertEq("127.0.0.1", resolveInfo.address);
chrome.test.succeed("IP literal resolved");
};
chrome.experimental.dns.resolve("127.0.0.1", callback);
chrome.dns.resolve("127.0.0.1", callback);
};

var testHostnameResolution = function() {
Expand All @@ -17,7 +17,7 @@ var testHostnameResolution = function() {
chrome.test.assertEq("9.8.7.6", resolveInfo.address);
chrome.test.succeed("hostname resolved");
};
chrome.experimental.dns.resolve("www.sowbug.com", callback);
chrome.dns.resolve("www.sowbug.com", callback);
};

var testNonexistentHostnameResolution = function() {
Expand All @@ -26,7 +26,7 @@ var testNonexistentHostnameResolution = function() {
chrome.test.assertEq(-105, resolveInfo.resultCode);
chrome.test.succeed("hostname correctly failed to resolve");
};
chrome.experimental.dns.resolve("this.hostname.is.bogus", callback);
chrome.dns.resolve("this.hostname.is.bogus", callback);
};

chrome.test.runTests([testIPLiteralResolution,
Expand Down
2 changes: 1 addition & 1 deletion chrome/test/data/extensions/api_test/dns/api/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
}
},
"permissions": [
"experimental"
"dns"
]
}
2 changes: 1 addition & 1 deletion tools/metrics/histograms/histograms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19861,7 +19861,7 @@ other types of suffix sets.
<int value="90" label="METRICSPRIVATE_RECORDSMALLCOUNT"/>
<int value="91" label="APP_CURRENTWINDOWINTERNAL_MINIMIZE"/>
<int value="92" label="DEVELOPERPRIVATE_AUTOUPDATE"/>
<int value="93" label="EXPERIMENTAL_DNS_RESOLVE"/>
<int value="93" label="DNS_RESOLVE"/>
<int value="94" label="EXPERIMENTAL_SYSTEMINFO_MEMORY_GET"/>
<int value="95" label="HISTORY_ADDURL"/>
<int value="96" label="TABS_GET"/>
Expand Down

0 comments on commit aa27da1

Please sign in to comment.