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

Side by Side Diff: third_party/WebKit/Source/web/WebDOMActivityLogger.cpp

Issue 2612903007: Migrate WTF::Vector::append() to ::push_back() [part 15 of N] (Closed)
Patch Set: Created 3 years, 11 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const v8::Local<v8::Value>* argv) override { 62 const v8::Local<v8::Value>* argv) override {
63 m_domActivityLogger->logMethod(WebString(apiName), argc, argv, getURL(), 63 m_domActivityLogger->logMethod(WebString(apiName), argc, argv, getURL(),
64 getTitle()); 64 getTitle());
65 } 65 }
66 66
67 void logEvent(const String& eventName, 67 void logEvent(const String& eventName,
68 int argc, 68 int argc,
69 const String* argv) override { 69 const String* argv) override {
70 Vector<WebString> webStringArgv; 70 Vector<WebString> webStringArgv;
71 for (int i = 0; i < argc; i++) 71 for (int i = 0; i < argc; i++)
72 webStringArgv.append(argv[i]); 72 webStringArgv.push_back(argv[i]);
73 m_domActivityLogger->logEvent(WebString(eventName), argc, 73 m_domActivityLogger->logEvent(WebString(eventName), argc,
74 webStringArgv.data(), getURL(), getTitle()); 74 webStringArgv.data(), getURL(), getTitle());
75 } 75 }
76 76
77 private: 77 private:
78 WebURL getURL() { 78 WebURL getURL() {
79 if (Document* document = 79 if (Document* document =
80 currentDOMWindow(v8::Isolate::GetCurrent())->document()) 80 currentDOMWindow(v8::Isolate::GetCurrent())->document())
81 return WebURL(document->url()); 81 return WebURL(document->url());
82 return WebURL(); 82 return WebURL();
(...skipping 16 matching lines...) Expand all
99 void setDOMActivityLogger(int worldId, 99 void setDOMActivityLogger(int worldId,
100 const WebString& extensionId, 100 const WebString& extensionId,
101 WebDOMActivityLogger* logger) { 101 WebDOMActivityLogger* logger) {
102 DCHECK(logger); 102 DCHECK(logger);
103 V8DOMActivityLogger::setActivityLogger( 103 V8DOMActivityLogger::setActivityLogger(
104 worldId, extensionId, 104 worldId, extensionId,
105 WTF::wrapUnique(new DOMActivityLoggerContainer(WTF::wrapUnique(logger)))); 105 WTF::wrapUnique(new DOMActivityLoggerContainer(WTF::wrapUnique(logger))));
106 } 106 }
107 107
108 } // namespace blink 108 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/TextFinder.cpp ('k') | third_party/WebKit/Source/web/WebDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698