Commit 1c614687 authored by morrita@chromium.org's avatar morrita@chromium.org

HTML Imports: Add an UseCounter for <link rel=import async>

TEST=none
BUG=383749
R=dglazkov@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176240 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent d5292cda
...@@ -460,6 +460,7 @@ public: ...@@ -460,6 +460,7 @@ public:
EditingApplePasteAsQuotation = 460, EditingApplePasteAsQuotation = 460,
EditingAppleStyleSpanClass = 461, EditingAppleStyleSpanClass = 461,
EditingAppleTabSpanClass = 462, EditingAppleTabSpanClass = 462,
HTMLImportsAsyncAttribute = 463,
// Add new features immediately above this line. Don't change assigned // Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. // numbers of any item, and don't reuse removed slots.
// Also, run update_use_counter_feature_enum.py in chromium/src/tools/metrics/histograms/ // Also, run update_use_counter_feature_enum.py in chromium/src/tools/metrics/histograms/
......
...@@ -91,6 +91,9 @@ static bool makesCycle(HTMLImport* parent, const KURL& url) ...@@ -91,6 +91,9 @@ static bool makesCycle(HTMLImport* parent, const KURL& url)
HTMLImportChild* HTMLImportsController::createChild(const KURL& url, HTMLImportLoader* loader, HTMLImport* parent, HTMLImportChildClient* client) HTMLImportChild* HTMLImportsController::createChild(const KURL& url, HTMLImportLoader* loader, HTMLImport* parent, HTMLImportChildClient* client)
{ {
HTMLImport::SyncMode mode = client->isSync() && !makesCycle(parent, url) ? HTMLImport::Sync : HTMLImport::Async; HTMLImport::SyncMode mode = client->isSync() && !makesCycle(parent, url) ? HTMLImport::Sync : HTMLImport::Async;
if (mode == HTMLImport::Async)
UseCounter::count(root()->document(), UseCounter::HTMLImportsAsyncAttribute);
OwnPtrWillBeRawPtr<HTMLImportChild> child = adoptPtrWillBeNoop(new HTMLImportChild(url, loader, mode)); OwnPtrWillBeRawPtr<HTMLImportChild> child = adoptPtrWillBeNoop(new HTMLImportChild(url, loader, mode));
child->setClient(client); child->setClient(client);
parent->appendImport(child.get()); parent->appendImport(child.get());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment