19258b6bc66e09368ada54001f619d53b4fc976d5ager@chromium.org// Copyright 2008 the V8 project authors. All rights reserved.
27276f14ca716596e0a0d17539516370c1f453847kasper.lund// Redistribution and use in source and binary forms, with or without
37276f14ca716596e0a0d17539516370c1f453847kasper.lund// modification, are permitted provided that the following conditions are
47276f14ca716596e0a0d17539516370c1f453847kasper.lund// met:
57276f14ca716596e0a0d17539516370c1f453847kasper.lund//
67276f14ca716596e0a0d17539516370c1f453847kasper.lund//     * Redistributions of source code must retain the above copyright
77276f14ca716596e0a0d17539516370c1f453847kasper.lund//       notice, this list of conditions and the following disclaimer.
87276f14ca716596e0a0d17539516370c1f453847kasper.lund//     * Redistributions in binary form must reproduce the above
97276f14ca716596e0a0d17539516370c1f453847kasper.lund//       copyright notice, this list of conditions and the following
107276f14ca716596e0a0d17539516370c1f453847kasper.lund//       disclaimer in the documentation and/or other materials provided
117276f14ca716596e0a0d17539516370c1f453847kasper.lund//       with the distribution.
127276f14ca716596e0a0d17539516370c1f453847kasper.lund//     * Neither the name of Google Inc. nor the names of its
137276f14ca716596e0a0d17539516370c1f453847kasper.lund//       contributors may be used to endorse or promote products derived
147276f14ca716596e0a0d17539516370c1f453847kasper.lund//       from this software without specific prior written permission.
157276f14ca716596e0a0d17539516370c1f453847kasper.lund//
167276f14ca716596e0a0d17539516370c1f453847kasper.lund// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
177276f14ca716596e0a0d17539516370c1f453847kasper.lund// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
187276f14ca716596e0a0d17539516370c1f453847kasper.lund// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
197276f14ca716596e0a0d17539516370c1f453847kasper.lund// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
207276f14ca716596e0a0d17539516370c1f453847kasper.lund// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
217276f14ca716596e0a0d17539516370c1f453847kasper.lund// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
227276f14ca716596e0a0d17539516370c1f453847kasper.lund// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
237276f14ca716596e0a0d17539516370c1f453847kasper.lund// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
247276f14ca716596e0a0d17539516370c1f453847kasper.lund// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
257276f14ca716596e0a0d17539516370c1f453847kasper.lund// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
267276f14ca716596e0a0d17539516370c1f453847kasper.lund// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
277276f14ca716596e0a0d17539516370c1f453847kasper.lund
287276f14ca716596e0a0d17539516370c1f453847kasper.lundfunction Initialize() { }
297276f14ca716596e0a0d17539516370c1f453847kasper.lund
307276f14ca716596e0a0d17539516370c1f453847kasper.lundfunction Process(request) {
317276f14ca716596e0a0d17539516370c1f453847kasper.lund  if (options.verbose) {
327276f14ca716596e0a0d17539516370c1f453847kasper.lund    log("Processing " + request.host + request.path +
337276f14ca716596e0a0d17539516370c1f453847kasper.lund        " from " + request.referrer + "@" + request.userAgent);
347276f14ca716596e0a0d17539516370c1f453847kasper.lund  }
357276f14ca716596e0a0d17539516370c1f453847kasper.lund  if (!output[request.host]) {
367276f14ca716596e0a0d17539516370c1f453847kasper.lund    output[request.host] = 1;
377276f14ca716596e0a0d17539516370c1f453847kasper.lund  } else {
387276f14ca716596e0a0d17539516370c1f453847kasper.lund    output[request.host]++
397276f14ca716596e0a0d17539516370c1f453847kasper.lund  }
407276f14ca716596e0a0d17539516370c1f453847kasper.lund}
417276f14ca716596e0a0d17539516370c1f453847kasper.lund
427276f14ca716596e0a0d17539516370c1f453847kasper.lundInitialize();
43