OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/api/web_request/web_request_api.h" | 5 #include "chrome/browser/extensions/api/web_request/web_request_api.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "net/base/auth.h" | 44 #include "net/base/auth.h" |
45 #include "net/base/net_errors.h" | 45 #include "net/base/net_errors.h" |
46 #include "net/base/net_log.h" | 46 #include "net/base/net_log.h" |
47 #include "net/http/http_response_headers.h" | 47 #include "net/http/http_response_headers.h" |
48 #include "net/url_request/url_request.h" | 48 #include "net/url_request/url_request.h" |
49 #include "ui/base/l10n/l10n_util.h" | 49 #include "ui/base/l10n/l10n_util.h" |
50 | 50 |
51 using content::BrowserMessageFilter; | 51 using content::BrowserMessageFilter; |
52 using content::BrowserThread; | 52 using content::BrowserThread; |
53 using content::ResourceRequestInfo; | 53 using content::ResourceRequestInfo; |
| 54 using extensions::Extension; |
54 | 55 |
55 namespace helpers = extension_web_request_api_helpers; | 56 namespace helpers = extension_web_request_api_helpers; |
56 namespace keys = extension_web_request_api_constants; | 57 namespace keys = extension_web_request_api_constants; |
57 | 58 |
58 namespace { | 59 namespace { |
59 | 60 |
60 // List of all the webRequest events. | 61 // List of all the webRequest events. |
61 static const char* const kWebRequestEvents[] = { | 62 static const char* const kWebRequestEvents[] = { |
62 keys::kOnBeforeRedirect, | 63 keys::kOnBeforeRedirect, |
63 keys::kOnBeforeRequest, | 64 keys::kOnBeforeRequest, |
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1716 } else if ((*it)->name().find("AdBlock") != std::string::npos) { | 1717 } else if ((*it)->name().find("AdBlock") != std::string::npos) { |
1717 adblock = true; | 1718 adblock = true; |
1718 } else { | 1719 } else { |
1719 other = true; | 1720 other = true; |
1720 } | 1721 } |
1721 } | 1722 } |
1722 } | 1723 } |
1723 | 1724 |
1724 host->Send(new ExtensionMsg_UsingWebRequestAPI(adblock, adblock_plus, other)); | 1725 host->Send(new ExtensionMsg_UsingWebRequestAPI(adblock, adblock_plus, other)); |
1725 } | 1726 } |
OLD | NEW |