summaryrefslogtreecommitdiffstats
path: root/webkit/glue/weberror_impl.cc
blob: 721336e8876c9bc3aa429b5dc9247125597c00a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "config.h"
#include "ResourceError.h"

#undef LOG
#include "webkit/glue/weberror_impl.h"

#include "webkit/glue/glue_util.h"
#include "webkit/glue/webkit_glue.h"

WebErrorImpl::WebErrorImpl(const WebCore::ResourceError& e)
    : error_code_(e.errorCode()),
      failed_url_(webkit_glue::StringToStdString(e.failingURL())) {
}

WebErrorImpl::WebErrorImpl(const WebError& e)
    : error_code_(e.GetErrorCode()),
      failed_url_(e.GetFailedURL()) {
}

int WebErrorImpl::GetErrorCode() const {
  return error_code_;
}

const GURL& WebErrorImpl::GetFailedURL() const {
  return failed_url_;
}