Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(843)

Unified Diff: content/browser/storage_partition_impl_unittest.cc

Issue 2512563003: Convert enable_plugins to a buildflag header. (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/storage_partition_impl.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/storage_partition_impl_unittest.cc
diff --git a/content/browser/storage_partition_impl_unittest.cc b/content/browser/storage_partition_impl_unittest.cc
index dc3ee844829085d15e802addb8a393837ca6a223..dd0e2ad76a4f8c1b8f21abca0618fdfffc319fc6 100644
--- a/content/browser/storage_partition_impl_unittest.cc
+++ b/content/browser/storage_partition_impl_unittest.cc
@@ -27,17 +27,18 @@
#include "net/cookies/cookie_store.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
+#include "ppapi/features/features.h"
#include "storage/browser/quota/quota_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
#include "ppapi/shared_impl/ppapi_constants.h"
#include "storage/browser/fileapi/async_file_util.h"
#include "storage/browser/fileapi/file_system_context.h"
#include "storage/browser/fileapi/file_system_operation_context.h"
#include "storage/browser/fileapi/isolated_context.h"
#include "storage/common/fileapi/file_system_util.h"
-#endif // defined(ENABLE_PLUGINS)
+#endif // BUILDFLAG(ENABLE_PLUGINS)
using net::CanonicalCookie;
@@ -53,10 +54,10 @@ const char kTestOrigin2[] = "http://host2:1/";
const char kTestOrigin3[] = "http://host3:1/";
const char kTestOriginDevTools[] = "chrome-devtools://abcdefghijklmnopqrstuvw/";
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
const char kWidevineCdmPluginId[] = "application_x-ppapi-widevine-cdm";
const char kClearKeyCdmPluginId[] = "application_x-ppapi-clearkey-cdm";
-#endif // defined(ENABLE_PLUGINS)
+#endif // BUILDFLAG(ENABLE_PLUGINS)
const GURL kOrigin1(kTestOrigin1);
const GURL kOrigin2(kTestOrigin2);
@@ -245,7 +246,7 @@ class RemoveLocalStorageTester {
DISALLOW_COPY_AND_ASSIGN(RemoveLocalStorageTester);
};
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
class RemovePluginPrivateDataTester {
public:
explicit RemovePluginPrivateDataTester(
@@ -436,7 +437,7 @@ class RemovePluginPrivateDataTester {
DISALLOW_COPY_AND_ASSIGN(RemovePluginPrivateDataTester);
};
-#endif // defined(ENABLE_PLUGINS)
+#endif // BUILDFLAG(ENABLE_PLUGINS)
bool IsWebSafeSchemeForTest(const std::string& scheme) {
return scheme == "http";
@@ -551,7 +552,7 @@ void ClearData(content::StoragePartition* partition,
time, time, run_loop->QuitClosure());
}
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
void ClearPluginPrivateData(content::StoragePartition* partition,
const GURL& storage_origin,
const base::Time delete_begin,
@@ -563,7 +564,7 @@ void ClearPluginPrivateData(content::StoragePartition* partition,
StoragePartition::OriginMatcherFunction(), delete_begin, delete_end,
run_loop->QuitClosure());
}
-#endif // defined(ENABLE_PLUGINS)
+#endif // BUILDFLAG(ENABLE_PLUGINS)
} // namespace
@@ -1197,7 +1198,7 @@ TEST_F(StoragePartitionImplTest, RemoveLocalStorageForLastWeek) {
EXPECT_TRUE(tester.DOMStorageExistsForOrigin(kOrigin3));
}
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
TEST_F(StoragePartitionImplTest, RemovePluginPrivateDataForever) {
StoragePartitionImpl* partition = static_cast<StoragePartitionImpl*>(
BrowserContext::GetDefaultStoragePartition(browser_context()));
@@ -1291,7 +1292,7 @@ TEST_F(StoragePartitionImplTest, RemovePluginPrivateDataWhileWriting) {
base::File file2 = tester.OpenClearKeyFileForWrite();
EXPECT_FALSE(file2.IsValid());
}
-#endif // defined(ENABLE_PLUGINS)
+#endif // BUILDFLAG(ENABLE_PLUGINS)
TEST(StoragePartitionImplStaticTest, CreatePredicateForHostCookies) {
GURL url("http://www.example.com/");
« no previous file with comments | « content/browser/storage_partition_impl.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698