diff options
author | vabr@chromium.org <vabr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-11 07:36:44 +0000 |
---|---|---|
committer | vabr@chromium.org <vabr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-11 07:36:44 +0000 |
commit | e319a143002e7b0df091c7bb677e259e54693f19 (patch) | |
tree | 4bad8143c6f1ef098902f571eaf3c0cf42edbdb4 /chrome/browser/extensions | |
parent | d8e564f3d437496f3b82341f5db4212927148f40 (diff) | |
download | chromium_src-e319a143002e7b0df091c7bb677e259e54693f19.zip chromium_src-e319a143002e7b0df091c7bb677e259e54693f19.tar.gz chromium_src-e319a143002e7b0df091c7bb677e259e54693f19.tar.bz2 |
Moving record API to api/record/ .
BUG=101244
TEST=N/A, only moving code, no change in functionality
Review URL: https://chromiumcodereview.appspot.com/10696144
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146079 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r-- | chrome/browser/extensions/api/record/record_api.cc (renamed from chrome/browser/extensions/extension_record_api.cc) | 7 | ||||
-rw-r--r-- | chrome/browser/extensions/api/record/record_api.h (renamed from chrome/browser/extensions/extension_record_api.h) | 10 | ||||
-rw-r--r-- | chrome/browser/extensions/api/record/record_api_test.cc (renamed from chrome/browser/extensions/extension_record_api_test.cc) | 6 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_function_registry.cc | 10 |
4 files changed, 20 insertions, 13 deletions
diff --git a/chrome/browser/extensions/extension_record_api.cc b/chrome/browser/extensions/api/record/record_api.cc index 6c6580d..1ebed8c 100644 --- a/chrome/browser/extensions/extension_record_api.cc +++ b/chrome/browser/extensions/api/record/record_api.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/extensions/extension_record_api.h" +#include "chrome/browser/extensions/api/record/record_api.h" #include "base/bind.h" #include "base/command_line.h" @@ -20,7 +20,9 @@ #include "content/public/browser/browser_thread.h" #include "content/public/common/content_switches.h" -namespace record = extensions::api::experimental_record; +namespace extensions { + +namespace record = api::experimental_record; ProcessStrategy::~ProcessStrategy() {} @@ -249,3 +251,4 @@ void ReplayURLsFunction::Finish() { SendResponse(true); } +} // namespace extensions diff --git a/chrome/browser/extensions/extension_record_api.h b/chrome/browser/extensions/api/record/record_api.h index a23e01a..4e31695 100644 --- a/chrome/browser/extensions/extension_record_api.h +++ b/chrome/browser/extensions/api/record/record_api.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_RECORD_API_H_ -#define CHROME_BROWSER_EXTENSIONS_EXTENSION_RECORD_API_H_ +#ifndef CHROME_BROWSER_EXTENSIONS_API_RECORD_RECORD_API_H_ +#define CHROME_BROWSER_EXTENSIONS_API_RECORD_RECORD_API_H_ #pragma once #include "chrome/browser/extensions/extension_function.h" @@ -19,6 +19,8 @@ const char kStatsKey[] = "stats"; }; +namespace extensions { + // ProcessStrategy abstracts the API's starting and waiting on a test // browser instance. This lets us browser-test the API without actually // firing up a sub browser instance. @@ -159,4 +161,6 @@ class ReplayURLsFunction : public RunPageCyclerFunction { std::string stats_; }; -#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_RECORD_API_H_ +} // namespace extensions + +#endif // CHROME_BROWSER_EXTENSIONS_API_RECORD_RECORD_API_H_ diff --git a/chrome/browser/extensions/extension_record_api_test.cc b/chrome/browser/extensions/api/record/record_api_test.cc index 411b69a..317a16f 100644 --- a/chrome/browser/extensions/extension_record_api_test.cc +++ b/chrome/browser/extensions/api/record/record_api_test.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/extensions/extension_record_api.h" +#include "chrome/browser/extensions/api/record/record_api.h" #include <string> @@ -29,6 +29,8 @@ namespace utils = extension_function_test_utils; +namespace extensions { + namespace { // Dummy content for mock stats file. @@ -341,3 +343,5 @@ IN_PROC_BROWSER_TEST_F(RecordApiTest, MAYBE_CheckPlayback) { EXPECT_TRUE(result->GetList(kErrorsKey, &errors)); EXPECT_TRUE(VerifyURLHandling(errors, strategy)); } + +} // namespace extensions diff --git a/chrome/browser/extensions/extension_function_registry.cc b/chrome/browser/extensions/extension_function_registry.cc index d2a2621..87a08be 100644 --- a/chrome/browser/extensions/extension_function_registry.cc +++ b/chrome/browser/extensions/extension_function_registry.cc @@ -22,6 +22,7 @@ #include "chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.h" #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" #include "chrome/browser/extensions/api/permissions/permissions_api.h" +#include "chrome/browser/extensions/api/record/record_api.h" #include "chrome/browser/extensions/api/runtime/runtime_api.h" #include "chrome/browser/extensions/api/serial/serial_api.h" #include "chrome/browser/extensions/api/socket/socket_api.h" @@ -43,7 +44,6 @@ #include "chrome/browser/extensions/extension_page_capture_api.h" #include "chrome/browser/extensions/extension_preference_api.h" #include "chrome/browser/extensions/extension_processes_api.h" -#include "chrome/browser/extensions/extension_record_api.h" #include "chrome/browser/extensions/extension_test_api.h" #include "chrome/browser/extensions/settings/settings_api.h" #include "chrome/browser/extensions/system/system_api.h" @@ -217,10 +217,6 @@ void ExtensionFunctionRegistry::ResetFunctions() { RegisterFunction<MetricsRecordMediumTimeFunction>(); RegisterFunction<MetricsRecordLongTimeFunction>(); - // Record. - RegisterFunction<CaptureURLsFunction>(); - RegisterFunction<ReplayURLsFunction>(); - // RLZ. #if defined(OS_WIN) || defined(OS_MACOSX) RegisterFunction<RlzRecordProductEventFunction>(); @@ -246,8 +242,8 @@ void ExtensionFunctionRegistry::ResetFunctions() { RegisterFunction<ExtensionTestGetConfigFunction>(); // Record. - RegisterFunction<CaptureURLsFunction>(); - RegisterFunction<ReplayURLsFunction>(); + RegisterFunction<extensions::CaptureURLsFunction>(); + RegisterFunction<extensions::ReplayURLsFunction>(); // Accessibility. RegisterFunction<GetFocusedControlFunction>(); |