summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsanjoy.pal@samsung.com <sanjoy.pal@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-19 09:26:29 +0000
committersanjoy.pal@samsung.com <sanjoy.pal@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-19 09:26:29 +0000
commitbd9f1113310363a7022d02b75d0f4c7c58eae141 (patch)
tree7e5b87cd70ed6974742756e270f28b69276a3edc
parent9117de760196434e5d52f12bc67c3f315e129fc0 (diff)
downloadchromium_src-bd9f1113310363a7022d02b75d0f4c7c58eae141.zip
chromium_src-bd9f1113310363a7022d02b75d0f4c7c58eae141.tar.gz
chromium_src-bd9f1113310363a7022d02b75d0f4c7c58eae141.tar.bz2
Remove experimental.rlz extension api completely
BUG=278556 TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/23452008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224090 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/extensions/extension_function_histogram_value.h8
-rw-r--r--chrome/browser/extensions/extension_function_registry.cc9
-rw-r--r--chrome/browser/rlz/rlz_extension_api.cc229
-rw-r--r--chrome/browser/rlz/rlz_extension_api.h81
-rw-r--r--chrome/browser/rlz/rlz_extension_apitest.cc128
-rw-r--r--chrome/chrome_browser.gypi2
-rw-r--r--chrome/chrome_tests.gypi6
-rw-r--r--chrome/common/extensions/api/_api_features.json4
-rw-r--r--chrome/common/extensions/api/experimental_rlz.json56
-rw-r--r--chrome/common/extensions/api/extension_api.cc2
-rw-r--r--chrome/common/extensions_api_resources.grd1
-rw-r--r--chrome/test/data/extensions/api_test/rlz/manifest.json10
-rw-r--r--chrome/test/data/extensions/api_test/rlz/test.js164
-rw-r--r--tools/metrics/histograms/histograms.xml8
14 files changed, 8 insertions, 700 deletions
diff --git a/chrome/browser/extensions/extension_function_histogram_value.h b/chrome/browser/extensions/extension_function_histogram_value.h
index e8cc904..96594cb 100644
--- a/chrome/browser/extensions/extension_function_histogram_value.h
+++ b/chrome/browser/extensions/extension_function_histogram_value.h
@@ -107,7 +107,7 @@ enum HistogramValue {
EXPERIMENTAL_DISCOVERY_REMOVESUGGESTION,
VIRTUALKEYBOARDPRIVATE_SENDKEYEVENT,
BOOKMARKMANAGERPRIVATE_GETSUBTREE,
- EXPERIMENTAL_RLZ_RECORDPRODUCTEVENT,
+ DELETED_EXPERIMENTAL_RLZ_RECORDPRODUCTEVENT,
BOOKMARKS_GETRECENT,
APP_CURRENTWINDOWINTERNAL_SETBOUNDS,
CLOUDPRINTPRIVATE_SETUPCONNECTOR,
@@ -179,7 +179,7 @@ enum HistogramValue {
EXTENSION_SETUPDATEURLDATA,
SERIAL_WRITE,
IDLE_QUERYSTATE,
- EXPERIMENTAL_RLZ_GETACCESSPOINTRLZ,
+ DELETED_EXPERIMENTAL_RLZ_GETACCESSPOINTRLZ,
WEBSTOREPRIVATE_SETSTORELOGIN,
PAGEACTIONS_ENABLEFORTAB,
COOKIES_SET,
@@ -226,7 +226,7 @@ enum HistogramValue {
MANAGEMENT_GET,
PERMISSIONS_GETALL,
DOWNLOADS_SHOW,
- EXPERIMENTAL_RLZ_CLEARPRODUCTSTATE,
+ DELETED_EXPERIMENTAL_RLZ_CLEARPRODUCTSTATE,
TABS_REMOVE,
MANAGEMENT_GETPERMISSIONWARNINGSBYID,
WINDOWS_GET,
@@ -326,7 +326,7 @@ enum HistogramValue {
DEVELOPERPRIVATE_GETITEMSINFO,
BLUETOOTH_STOPDISCOVERY,
COOKIES_REMOVE,
- EXPERIMENTAL_RLZ_SENDFINANCIALPING,
+ DELETED_EXPERIMENTAL_RLZ_SENDFINANCIALPING,
TABCAPTURE_GETCAPTUREDTABS,
WINDOWS_REMOVE,
WALLPAPERPRIVATE_GETOFFLINEWALLPAPERLIST,
diff --git a/chrome/browser/extensions/extension_function_registry.cc b/chrome/browser/extensions/extension_function_registry.cc
index ddf7923..7b476d9 100644
--- a/chrome/browser/extensions/extension_function_registry.cc
+++ b/chrome/browser/extensions/extension_function_registry.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/extensions/api/preference/preference_api.h"
#include "chrome/browser/extensions/api/runtime/runtime_api.h"
#include "chrome/browser/extensions/api/web_request/web_request_api.h"
-#include "chrome/browser/rlz/rlz_extension_api.h"
#include "chrome/common/extensions/api/generated_api.h"
// static
@@ -29,14 +28,6 @@ void ExtensionFunctionRegistry::ResetFunctions() {
// Register all functions here.
- // RLZ (not supported on ChromeOS yet).
-#if defined(ENABLE_RLZ) && !defined(OS_CHROMEOS)
- RegisterFunction<RlzRecordProductEventFunction>();
- RegisterFunction<RlzGetAccessPointRlzFunction>();
- RegisterFunction<RlzSendFinancialPingFunction>();
- RegisterFunction<RlzClearProductStateFunction>();
-#endif
-
// WebRequest.
RegisterFunction<WebRequestAddEventListener>();
RegisterFunction<WebRequestEventHandled>();
diff --git a/chrome/browser/rlz/rlz_extension_api.cc b/chrome/browser/rlz/rlz_extension_api.cc
deleted file mode 100644
index 7447ce7..0000000
--- a/chrome/browser/rlz/rlz_extension_api.cc
+++ /dev/null
@@ -1,229 +0,0 @@
-// Copyright (c) 2012 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 "chrome/browser/rlz/rlz_extension_api.h"
-
-#include "base/bind.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/threading/sequenced_worker_pool.h"
-#include "base/threading/thread_restrictions.h"
-#include "base/values.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/common/extensions/extension.h"
-#include "rlz/lib/lib_values.h"
-#include "rlz/lib/rlz_lib.h"
-
-namespace {
-
-bool GetProductFromName(const std::string& product_name,
- rlz_lib::Product* product) {
- bool success = true;
- switch (product_name[0]) {
- case 'B':
- *product = rlz_lib::FF_TOOLBAR;
- break;
- case 'C':
- *product = rlz_lib::CHROME;
- break;
- case 'D':
- *product = rlz_lib::DESKTOP;
- break;
- case 'K':
- *product = rlz_lib::QSB_WIN;
- break;
- case 'N':
- *product = rlz_lib::PINYIN_IME;
- break;
- case 'P':
- *product = rlz_lib::TOOLBAR_NOTIFIER;
- break;
- case 'T':
- *product = rlz_lib::IE_TOOLBAR;
- break;
- case 'U':
- *product = rlz_lib::PACK;
- break;
- case 'W':
- *product = rlz_lib::WEBAPPS;
- break;
- default:
- success = false;
- break;
- }
-
- return success;
-}
-
-bool GetEventFromName(const std::string& event_name,
- rlz_lib::Event* event_id) {
- *event_id = rlz_lib::INVALID_EVENT;
-
- if (event_name == "install") {
- *event_id = rlz_lib::INSTALL;
- } else if (event_name == "set-to-google") {
- *event_id = rlz_lib::SET_TO_GOOGLE;
- } else if (event_name == "first-search") {
- *event_id = rlz_lib::FIRST_SEARCH;
- } else if (event_name == "activate") {
- *event_id = rlz_lib::ACTIVATE;
- }
-
- return *event_id != rlz_lib::INVALID_EVENT;
-}
-
-} // namespace
-
-bool RlzRecordProductEventFunction::RunImpl() {
- // This can be slow if registry access goes to disk. Should preferably
- // perform registry operations on the File thread.
- // http://code.google.com/p/chromium/issues/detail?id=62098
- base::ThreadRestrictions::ScopedAllowIO allow_io;
-
- std::string product_name;
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &product_name));
- rlz_lib::Product product;
- EXTENSION_FUNCTION_VALIDATE(GetProductFromName(product_name, &product));
-
- std::string ap_name;
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(1, &ap_name));
- rlz_lib::AccessPoint access_point;
- EXTENSION_FUNCTION_VALIDATE(rlz_lib::GetAccessPointFromName(ap_name.c_str(),
- &access_point));
-
- std::string event_name;
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(2, &event_name));
- rlz_lib::Event event_id;
- EXTENSION_FUNCTION_VALIDATE(GetEventFromName(event_name, &event_id));
-
- return rlz_lib::RecordProductEvent(product, access_point, event_id);
-}
-
-bool RlzGetAccessPointRlzFunction::RunImpl() {
- // This can be slow if registry access goes to disk. Should preferably
- // perform registry operations on the File thread.
- // http://code.google.com/p/chromium/issues/detail?id=62098
- base::ThreadRestrictions::ScopedAllowIO allow_io;
-
- std::string ap_name;
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &ap_name));
- rlz_lib::AccessPoint access_point;
- EXTENSION_FUNCTION_VALIDATE(rlz_lib::GetAccessPointFromName(ap_name.c_str(),
- &access_point));
-
- char rlz[rlz_lib::kMaxRlzLength + 1];
- rlz_lib::GetAccessPointRlz(access_point, rlz, rlz_lib::kMaxRlzLength);
- SetResult(Value::CreateStringValue(rlz));
- return true;
-}
-
-RlzSendFinancialPingFunction::RlzSendFinancialPingFunction()
- : product_(rlz_lib::CHROME),
- exclude_machine_id_(true) {
-}
-
-RlzSendFinancialPingFunction::~RlzSendFinancialPingFunction() {
-}
-
-bool RlzSendFinancialPingFunction::RunImpl() {
- std::string product_name;
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &product_name));
- EXTENSION_FUNCTION_VALIDATE(GetProductFromName(product_name, &product_));
-
- ListValue* access_points_list;
- EXTENSION_FUNCTION_VALIDATE(args_->GetList(1, &access_points_list));
- if (access_points_list->GetSize() < 1) {
- EXTENSION_FUNCTION_ERROR("Access point array should not be empty.");
- }
-
- // Allocate an access point array to pass to ClearProductState(). The array
- // must be terminated with the value rlz_lib::NO_ACCESS_POINT, hence + 1
- // when allocating the array.
- access_points_.reset(
- new rlz_lib::AccessPoint[access_points_list->GetSize() + 1]);
-
- size_t i;
- for (i = 0; i < access_points_list->GetSize(); ++i) {
- std::string ap_name;
- EXTENSION_FUNCTION_VALIDATE(access_points_list->GetString(i, &ap_name));
- EXTENSION_FUNCTION_VALIDATE(rlz_lib::GetAccessPointFromName(
- ap_name.c_str(), &access_points_[i]));
- }
- access_points_[i] = rlz_lib::NO_ACCESS_POINT;
-
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(2, &signature_));
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(3, &brand_));
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(4, &id_));
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(5, &lang_));
- EXTENSION_FUNCTION_VALIDATE(args_->GetBoolean(6, &exclude_machine_id_));
-
- // |system_request_context| needs to run on the UI thread.
- rlz_lib::SetURLRequestContext(g_browser_process->system_request_context());
-
- content::BrowserThread::GetBlockingPool()->PostTask(
- FROM_HERE,
- base::Bind(&RlzSendFinancialPingFunction::WorkOnWorkerThread, this));
-
- return true;
-}
-
-void RlzSendFinancialPingFunction::WorkOnWorkerThread() {
- // rlz_lib::SendFinancialPing() will not send a ping more often than once in
- // any 24-hour period. Calling it more often has no effect. If a ping is
- // not sent false is returned, but this is not an error, so we should not
- // use the return value of rlz_lib::SendFinancialPing() as the return value
- // of this function. Callers interested in the return value can register
- // an optional callback function.
- bool sent = rlz_lib::SendFinancialPing(product_, access_points_.get(),
- signature_.c_str(), brand_.c_str(),
- id_.c_str(), lang_.c_str(),
- exclude_machine_id_);
-
- SetResult(Value::CreateBooleanValue(sent));
-
- bool post_task_result = content::BrowserThread::PostTask(
- content::BrowserThread::UI, FROM_HERE,
- base::Bind(&RlzSendFinancialPingFunction::RespondOnUIThread, this));
- DCHECK(post_task_result);
-}
-
-void RlzSendFinancialPingFunction::RespondOnUIThread() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- SendResponse(true);
-}
-
-bool RlzClearProductStateFunction::RunImpl() {
- // This can be slow if registry access goes to disk. Should preferably
- // perform registry operations on the File thread.
- // http://code.google.com/p/chromium/issues/detail?id=62098
- base::ThreadRestrictions::ScopedAllowIO allow_io;
-
- std::string product_name;
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &product_name));
- rlz_lib::Product product;
- EXTENSION_FUNCTION_VALIDATE(GetProductFromName(product_name, &product));
-
- ListValue* access_points_list;
- EXTENSION_FUNCTION_VALIDATE(args_->GetList(1, &access_points_list));
- if (access_points_list->GetSize() < 1) {
- EXTENSION_FUNCTION_ERROR("Access point array should not be empty.");
- }
-
- // Allocate an access point array to pass to ClearProductState(). The array
- // must be termindated with the value rlz_lib::NO_ACCESS_POINT, hence + 1
- // when allocating the array.
- scoped_ptr<rlz_lib::AccessPoint[]> access_points(
- new rlz_lib::AccessPoint[access_points_list->GetSize() + 1]);
-
- size_t i;
- for (i = 0; i < access_points_list->GetSize(); ++i) {
- std::string ap_name;
- EXTENSION_FUNCTION_VALIDATE(access_points_list->GetString(i, &ap_name));
- EXTENSION_FUNCTION_VALIDATE(rlz_lib::GetAccessPointFromName(
- ap_name.c_str(), &access_points[i]));
- }
- access_points[i] = rlz_lib::NO_ACCESS_POINT;
-
- rlz_lib::ClearProductState(product, access_points.get());
- return true;
-}
diff --git a/chrome/browser/rlz/rlz_extension_api.h b/chrome/browser/rlz/rlz_extension_api.h
deleted file mode 100644
index a077e59..0000000
--- a/chrome/browser/rlz/rlz_extension_api.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2012 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 CHROME_BROWSER_RLZ_RLZ_EXTENSION_API_H_
-#define CHROME_BROWSER_RLZ_RLZ_EXTENSION_API_H_
-
-#include "build/build_config.h"
-
-#if defined(ENABLE_RLZ)
-
-#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/extensions/extension_function.h"
-#include "rlz/lib/lib_values.h"
-
-class RlzRecordProductEventFunction : public SyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION("experimental.rlz.recordProductEvent",
- EXPERIMENTAL_RLZ_RECORDPRODUCTEVENT)
-
- protected:
- virtual ~RlzRecordProductEventFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class RlzGetAccessPointRlzFunction : public SyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION("experimental.rlz.getAccessPointRlz",
- EXPERIMENTAL_RLZ_GETACCESSPOINTRLZ)
-
- protected:
- virtual ~RlzGetAccessPointRlzFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class RlzSendFinancialPingFunction : public AsyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION("experimental.rlz.sendFinancialPing",
- EXPERIMENTAL_RLZ_SENDFINANCIALPING)
-
- RlzSendFinancialPingFunction();
-
- protected:
- friend class MockRlzSendFinancialPingFunction;
- virtual ~RlzSendFinancialPingFunction();
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-
- private:
- void WorkOnWorkerThread();
- void RespondOnUIThread();
-
- rlz_lib::Product product_;
- scoped_ptr<rlz_lib::AccessPoint[]> access_points_;
- std::string signature_;
- std::string brand_;
- std::string id_;
- std::string lang_;
- bool exclude_machine_id_;
-};
-
-class RlzClearProductStateFunction : public SyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION("experimental.rlz.clearProductState",
- EXPERIMENTAL_RLZ_CLEARPRODUCTSTATE)
-
- protected:
- virtual ~RlzClearProductStateFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-#endif // defined(ENABLE_RLZ)
-
-#endif // CHROME_BROWSER_RLZ_RLZ_EXTENSION_API_H_
diff --git a/chrome/browser/rlz/rlz_extension_apitest.cc b/chrome/browser/rlz/rlz_extension_apitest.cc
deleted file mode 100644
index 3cf21c2..0000000
--- a/chrome/browser/rlz/rlz_extension_apitest.cc
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright (c) 2012 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 <map>
-
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/extensions/extension_apitest.h"
-#include "chrome/browser/extensions/extension_function.h"
-#include "chrome/browser/extensions/extension_function_dispatcher.h"
-#include "chrome/browser/rlz/rlz_extension_api.h"
-#include "chrome/common/extensions/extension.h"
-#include "extensions/common/switches.h"
-#include "net/dns/mock_host_resolver.h"
-#include "rlz/lib/rlz_lib.h"
-
-#if (OS_WIN)
-#include "base/win/registry.h"
-#endif
-
-class MockRlzSendFinancialPingFunction : public RlzSendFinancialPingFunction {
- public:
- static int expected_count() {
- return expected_count_;
- }
-
- protected:
- virtual ~MockRlzSendFinancialPingFunction() {}
-
- // ExtensionFunction
- virtual bool RunImpl() OVERRIDE;
-
- private:
- static int expected_count_;
-};
-
-int MockRlzSendFinancialPingFunction::expected_count_ = 0;
-
-bool MockRlzSendFinancialPingFunction::RunImpl() {
- EXPECT_TRUE(RlzSendFinancialPingFunction::RunImpl());
- ++expected_count_;
- return true;
-}
-
-ExtensionFunction* MockRlzSendFinancialPingFunctionFactory() {
- return new MockRlzSendFinancialPingFunction();
-}
-
-// Mac is flaky - http://crbug.com/137834. ChromeOS is not supported yet.
-#if defined(OS_MACOSX) || defined(OS_CHROMEOS)
-#define MAYBE_Rlz DISABLED_Rlz
-#else
-#define MAYBE_Rlz Rlz
-#endif
-
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_Rlz) {
- // The default test resolver doesn't allow lookups to *.google.com. That
- // makes sense, but it does make RLZ's SendFinancialPing() fail -- so allow
- // connections to google.com in this test.
- scoped_refptr<net::RuleBasedHostResolverProc> resolver =
- new net::RuleBasedHostResolverProc(host_resolver());
- resolver->AllowDirectLookup("*.google.com");
- net::ScopedDefaultHostResolverProc scoper(resolver);
-
- CommandLine::ForCurrentProcess()->AppendSwitch(
- extensions::switches::kEnableExperimentalExtensionApis);
-
- // Before running the tests, clear the state of the RLZ products used.
- rlz_lib::AccessPoint access_points[] = {
- rlz_lib::GD_WEB_SERVER,
- rlz_lib::GD_OUTLOOK,
- rlz_lib::NO_ACCESS_POINT,
- };
- rlz_lib::ClearProductState(rlz_lib::PINYIN_IME, access_points);
- rlz_lib::ClearProductState(rlz_lib::DESKTOP, access_points);
-
-#if defined(OS_WIN)
- // Check that the state has really been cleared.
- base::win::RegKey key(HKEY_CURRENT_USER,
- L"Software\\Google\\Common\\Rlz\\Events\\N",
- KEY_READ);
- ASSERT_FALSE(key.Valid());
-
- key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\D",
- KEY_READ);
- ASSERT_FALSE(key.Valid());
-#endif
-
- // Mock out experimental.rlz.sendFinancialPing().
- ASSERT_TRUE(ExtensionFunctionDispatcher::OverrideFunction(
- "experimental.rlz.sendFinancialPing",
- MockRlzSendFinancialPingFunctionFactory));
-
- // Set the access point that the test code is expecting.
- ASSERT_TRUE(rlz_lib::SetAccessPointRlz(rlz_lib::GD_DESKBAND, "rlz_apitest"));
-
- // Now run all the tests.
- ASSERT_TRUE(RunExtensionTest("rlz")) << message_;
-
- ASSERT_EQ(3, MockRlzSendFinancialPingFunction::expected_count());
- ExtensionFunctionDispatcher::ResetFunctions();
-
-#if defined(OS_WIN)
- // Now make sure we recorded what was expected. If the code in test.js
- // changes, need to make appropriate changes here.
- key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\N",
- KEY_READ);
- ASSERT_TRUE(key.Valid());
-
- DWORD value;
- ASSERT_EQ(ERROR_SUCCESS, key.ReadValueDW(L"D3I", &value));
- ASSERT_EQ(1, value);
- ASSERT_EQ(ERROR_SUCCESS, key.ReadValueDW(L"D3S", &value));
- ASSERT_EQ(1, value);
- ASSERT_EQ(ERROR_SUCCESS, key.ReadValueDW(L"D3F", &value));
- ASSERT_EQ(1, value);
-
- ASSERT_EQ(ERROR_SUCCESS, key.ReadValueDW(L"D4I", &value));
- ASSERT_EQ(1, value);
-
- key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\D",
- KEY_READ);
- ASSERT_FALSE(key.Valid());
-#endif
-
- // Cleanup.
- rlz_lib::ClearProductState(rlz_lib::PINYIN_IME, access_points);
-}
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index ba78bb2..a076fcb 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -2623,8 +2623,6 @@
'browser/accessibility/accessibility_extension_api.h',
'browser/infobars/infobar_extension_api.cc',
'browser/infobars/infobar_extension_api.h',
- 'browser/rlz/rlz_extension_api.cc',
- 'browser/rlz/rlz_extension_api.h',
'browser/speech/extension_api/tts_extension_api.cc',
'browser/speech/extension_api/tts_extension_api.h',
'browser/speech/extension_api/tts_engine_extension_api.cc',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 68e4381..3ac40df 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -1313,7 +1313,6 @@
'browser/renderer_host/render_process_host_chrome_browsertest.cc',
'browser/renderer_host/web_cache_manager_browsertest.cc',
'browser/repost_form_warning_browsertest.cc',
- 'browser/rlz/rlz_extension_apitest.cc',
'browser/safe_browsing/local_safebrowsing_test_server.cc',
'browser/safe_browsing/safe_browsing_blocking_page_test.cc',
'browser/safe_browsing/safe_browsing_service_browsertest.cc',
@@ -1739,11 +1738,6 @@
'browser/ui/gtk/view_id_util_browsertest.cc',
],
}],
- ['enable_rlz==0', {
- 'sources!': [
- 'browser/rlz/rlz_extension_apitest.cc',
- ],
- }],
['enable_webrtc==0', {
'sources!': [
'browser/media/chrome_webrtc_browsertest.cc',
diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/extensions/api/_api_features.json
index 1b87c65..afe3be2 100644
--- a/chrome/common/extensions/api/_api_features.json
+++ b/chrome/common/extensions/api/_api_features.json
@@ -209,10 +209,6 @@
"dependencies": ["permission:experimental"],
"contexts": ["blessed_extension"]
},
- "experimental.rlz": {
- "dependencies": ["permission:experimental"],
- "contexts": ["blessed_extension"]
- },
"extension": {
"channel": "stable",
"extension_types": ["extension", "legacy_packaged_app"],
diff --git a/chrome/common/extensions/api/experimental_rlz.json b/chrome/common/extensions/api/experimental_rlz.json
deleted file mode 100644
index f97f925e..0000000
--- a/chrome/common/extensions/api/experimental_rlz.json
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 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.
-
-[
- {
- "namespace": "experimental.rlz",
- "description": "none",
- "functions": [
- {
- "name": "recordProductEvent",
- "type": "function",
- "description": "Records an RLZ event for a given product's access point.",
- "parameters": [
- {"name": "product", "type": "string", "minLength": 1, "maxLength": 1},
- {"name": "accessPoint", "type": "string", "minLength": 1, "maxLength": 2},
- {"name": "event", "type": "string", "enum": ["install", "set-to-google", "first-search", "activate"]}
- ]
- },
- {
- "name": "getAccessPointRlz",
- "type": "function",
- "description": "Gets the RLZ string to be used when accessing a Google property through the given access point.",
- "parameters": [
- {"name": "accessPoint", "type": "string", "minLength": 1, "maxLength": 2},
- {"name": "callback", "type": "function", "parameters": [{"name": "rlz", "type": "string"}]}
- ]
- },
- {
- "name": "sendFinancialPing",
- "type": "function",
- "description": "Sends Google promotional information about this extension.",
- "parameters": [
- {"name": "product", "type": "string", "minLength": 1, "maxLength": 1},
- {"name": "accessPoints", "type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 2}, "minItems": 1},
- {"name": "signature", "type": "string"},
- {"name": "brand", "type": "string"},
- {"name": "id", "type": "string"},
- {"name": "lang", "type": "string"},
- {"name": "exclude_machine_id", "type": "boolean"},
- {"name": "callback", "type": "function", "optional": true, "parameters": [{"name": "sent", "type": "boolean"}]}
- ]
- },
- {
- "name": "clearProductState",
- "type": "function",
- "description": "Clears all product-specific RLZ state from the machine, as well as clearing all events for the specified access points.",
- "parameters": [
- {"name": "product", "type": "string", "minLength": 1, "maxLength": 1},
- {"name": "accessPoints", "type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 2}, "minItems": 1}
- ]
- }
- ],
- "events": []
- }
-]
diff --git a/chrome/common/extensions/api/extension_api.cc b/chrome/common/extensions/api/extension_api.cc
index 9b734d3..ca3ffeb 100644
--- a/chrome/common/extensions/api/extension_api.cc
+++ b/chrome/common/extensions/api/extension_api.cc
@@ -241,8 +241,6 @@ void ExtensionAPI::InitDefaultConfiguration() {
IDR_EXTENSION_API_JSON_DECLARATIVE_CONTENT);
RegisterSchemaResource("declarativeWebRequest",
IDR_EXTENSION_API_JSON_DECLARATIVE_WEBREQUEST);
- RegisterSchemaResource("experimental.rlz",
- IDR_EXTENSION_API_JSON_EXPERIMENTAL_RLZ);
RegisterSchemaResource("runtime", IDR_EXTENSION_API_JSON_RUNTIME);
RegisterSchemaResource("fileBrowserHandler",
IDR_EXTENSION_API_JSON_FILEBROWSERHANDLER);
diff --git a/chrome/common/extensions_api_resources.grd b/chrome/common/extensions_api_resources.grd
index 44a8db7..dff2581 100644
--- a/chrome/common/extensions_api_resources.grd
+++ b/chrome/common/extensions_api_resources.grd
@@ -16,7 +16,6 @@
<include name="IDR_EXTENSION_API_JSON_DECLARATIVE_CONTENT" file="extensions\api\declarative_content.json" type="BINDATA" />
<include name="IDR_EXTENSION_API_JSON_DECLARATIVE_WEBREQUEST" file="extensions\api\declarative_web_request.json" type="BINDATA" />
<include name="IDR_EXTENSION_API_JSON_ECHOPRIVATE" file="extensions\api\echo_private.json" type="BINDATA" />
- <include name="IDR_EXTENSION_API_JSON_EXPERIMENTAL_RLZ" file="extensions\api\experimental_rlz.json" type="BINDATA" />
<include name="IDR_EXTENSION_API_JSON_FILEBROWSERHANDLER" file="extensions\api\file_browser_handler.json" type="BINDATA" />
<include name="IDR_EXTENSION_API_JSON_FILEBROWSERPRIVATE" file="extensions\api\file_browser_private.json" type="BINDATA" />
<include name="IDR_EXTENSION_API_JSON_INPUTMETHODPRIVATE" file="extensions\api\input_method_private.json" type="BINDATA" />
diff --git a/chrome/test/data/extensions/api_test/rlz/manifest.json b/chrome/test/data/extensions/api_test/rlz/manifest.json
deleted file mode 100644
index b7c1d3c..0000000
--- a/chrome/test/data/extensions/api_test/rlz/manifest.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "chrome.rlz",
- "version": "0.1",
- "manifest_version": 2,
- "description": "end-to-end browser test for chrome.rlz API",
- "background": {
- "scripts": ["test.js"]
- },
- "permissions": ["experimental"]
-}
diff --git a/chrome/test/data/extensions/api_test/rlz/test.js b/chrome/test/data/extensions/api_test/rlz/test.js
deleted file mode 100644
index 086a6fb..0000000
--- a/chrome/test/data/extensions/api_test/rlz/test.js
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright (c) 2010 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.
-
-// RLZ api test
-// browser_tests.exe --gtest_filter=ExtensionApiTest.Rlz
-
-// If this code changes, then the corresponding code in extension_rlz_apitest.cc
-// also needs to change.
-
-chrome.test.runTests([
- function recordProductNEvent() {
- chrome.experimental.rlz.recordProductEvent('N', 'D3', 'install');
- chrome.experimental.rlz.recordProductEvent('N', 'D3', 'set-to-google');
- chrome.experimental.rlz.recordProductEvent('N', 'D3', 'first-search');
-
- chrome.experimental.rlz.recordProductEvent('N', 'D4', 'install');
- chrome.test.succeed();
- },
-
- function badProductName() {
- try {
- chrome.experimental.rlz.recordProductEvent('NN', 'D3', 'install');
- // Should not reach this line since the above call throws.
- chrome.test.fail();
- } catch(ex) {
- }
-
- try {
- chrome.experimental.rlz.recordProductEvent('', 'D3', 'install');
- // Should not reach this line since the above call throws.
- chrome.test.fail();
- } catch(ex) {
- }
-
- try {
- chrome.experimental.rlz.recordProductEvent(null, 'D3', 'install');
- // Should not reach this line since the above call throws.
- chrome.test.fail();
- } catch(ex) {
- }
-
- chrome.test.succeed();
- },
-
- function badAccessPointName() {
- try {
- chrome.experimental.rlz.recordProductEvent('N', 'D3A', 'install');
- // Should not reach this line since the above call throws.
- chrome.test.fail();
- } catch(ex) {
- }
-
- try {
- chrome.experimental.rlz.recordProductEvent('N', '', 'install');
- // Should not reach this line since the above call throws.
- chrome.test.fail();
- } catch(ex) {
- }
-
- try {
- chrome.experimental.rlz.recordProductEvent('N', null, 'install');
- // Should not reach this line since the above call throws.
- chrome.test.fail();
- } catch(ex) {
- }
-
- chrome.test.succeed();
- },
-
- function badEventName() {
- try {
- chrome.experimental.rlz.recordProductEvent('N', 'D3', 'foo');
- // Should not reach this line since the above call throws.
- chrome.test.fail();
- } catch(ex) {
- }
-
- try {
- chrome.experimental.rlz.recordProductEvent('N', 'D3', null);
- // Should not reach this line since the above call throws.
- chrome.test.fail();
- } catch(ex) {
- }
-
- chrome.test.succeed();
- },
-
- function recordProductDEvent() {
- chrome.experimental.rlz.recordProductEvent('D', 'D3', 'install');
- chrome.experimental.rlz.recordProductEvent('D', 'D4', 'install');
- chrome.test.succeed();
- },
-
- function clearProductState() {
- chrome.experimental.rlz.clearProductState('D', ['D3', 'D4']);
- chrome.test.succeed();
- },
-
- function getAccessPointRlz() {
- // Using an access point different then those used above so that if the
- // clearProductState() test runs before this one it does not clear the
- // rlz string tested for here.
- chrome.experimental.rlz.getAccessPointRlz('D1', function(rlzString) {
- chrome.test.assertEq('rlz_apitest', rlzString);
- chrome.test.succeed();
- });
- },
-
- function sendFinancialPing() {
- // Bad product.
- try {
- chrome.experimental.rlz.sendFinancialPing('', ['D3'], 'sig', 'TEST',
- 'id', 'en', false);
- // Should not reach this line since the above call throws.
- chrome.test.fail();
- } catch(ex) {
- }
-
- // Bad access point list.
- try {
- chrome.experimental.rlz.sendFinancialPing('D', null, 'sig', 'TEST',
- 'id', 'en', false);
- // Should not reach this line since the above call throws.
- chrome.test.fail();
- } catch(ex) {
- }
-
- // Bad access point list.
- try {
- chrome.experimental.rlz.sendFinancialPing('D', [], 'sig', 'TEST',
- 'id', 'en', false);
- // Should not reach this line since the above call throws.
- chrome.test.fail();
- } catch(ex) {
- }
-
- // Valid call. Should send a ping.
- chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST',
- 'id', 'en', false,
- function(sent) {
- if (sent) {
- chrome.test.succeed();
- } else {
- chrome.test.fail();
- }
-
- // Try another call, this time the ping should not be sent.
- chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST',
- 'id', 'en', false,
- function(sent) {
- if (sent) {
- chrome.test.fail();
- } else {
- chrome.test.succeed();
- }
- });
- });
-
- // Valid call. Test that callback does not need to be specified.
- chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST',
- 'id', 'en', false);
- }
-]);
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 7a7ce0d..4d9d75b 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -20269,7 +20269,7 @@ other types of suffix sets.
<int value="45" label="EXPERIMENTAL_DISCOVERY_REMOVESUGGESTION"/>
<int value="46" label="VIRTUALKEYBOARDPRIVATE_SENDKEYEVENT"/>
<int value="47" label="BOOKMARKMANAGERPRIVATE_GETSUBTREE"/>
- <int value="48" label="EXPERIMENTAL_RLZ_RECORDPRODUCTEVENT"/>
+ <int value="48" label="DELETED_EXPERIMENTAL_RLZ_RECORDPRODUCTEVENT"/>
<int value="49" label="BOOKMARKS_GETRECENT"/>
<int value="50" label="APP_CURRENTWINDOWINTERNAL_SETBOUNDS"/>
<int value="51" label="CLOUDPRINTPRIVATE_SETUPCONNECTOR"/>
@@ -20341,7 +20341,7 @@ other types of suffix sets.
<int value="117" label="EXTENSION_SETUPDATEURLDATA"/>
<int value="118" label="SERIAL_WRITE"/>
<int value="119" label="IDLE_QUERYSTATE"/>
- <int value="120" label="EXPERIMENTAL_RLZ_GETACCESSPOINTRLZ"/>
+ <int value="120" label="DELETED_EXPERIMENTAL_RLZ_GETACCESSPOINTRLZ"/>
<int value="121" label="WEBSTOREPRIVATE_SETSTORELOGIN"/>
<int value="122" label="PAGEACTIONS_ENABLEFORTAB"/>
<int value="123" label="COOKIES_SET"/>
@@ -20389,7 +20389,7 @@ other types of suffix sets.
<int value="164" label="MANAGEMENT_GET"/>
<int value="165" label="PERMISSIONS_GETALL"/>
<int value="166" label="DOWNLOADS_SHOW"/>
- <int value="167" label="EXPERIMENTAL_RLZ_CLEARPRODUCTSTATE"/>
+ <int value="167" label="DELETED_EXPERIMENTAL_RLZ_CLEARPRODUCTSTATE"/>
<int value="168" label="TABS_REMOVE"/>
<int value="169" label="MANAGEMENT_GETPERMISSIONWARNINGSBYID"/>
<int value="170" label="WINDOWS_GET"/>
@@ -20489,7 +20489,7 @@ other types of suffix sets.
<int value="264" label="DEVELOPERPRIVATE_GETITEMSINFO"/>
<int value="265" label="BLUETOOTH_STOPDISCOVERY"/>
<int value="266" label="COOKIES_REMOVE"/>
- <int value="267" label="EXPERIMENTAL_RLZ_SENDFINANCIALPING"/>
+ <int value="267" label="DELETED_EXPERIMENTAL_RLZ_SENDFINANCIALPING"/>
<int value="268" label="TABCAPTURE_GETCAPTUREDTABS"/>
<int value="269" label="WINDOWS_REMOVE"/>
<int value="270" label="WALLPAPERPRIVATE_GETOFFLINEWALLPAPERLIST"/>