Chromium Code Reviews| 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 // A general interface for filtering and only acting on classes in Chromium C++ | 5 // A general interface for filtering and only acting on classes in Chromium C++ |
| 6 // code. | 6 // code. |
| 7 | 7 |
| 8 #include "ChromeClassTester.h" | 8 #include "ChromeClassTester.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 231 source_manager.getImmediateExpansionRange(record_location).first; | 231 source_manager.getImmediateExpansionRange(record_location).first; |
| 232 } | 232 } |
| 233 | 233 |
| 234 return false; | 234 return false; |
| 235 } | 235 } |
| 236 | 236 |
| 237 void ChromeClassTester::BuildBannedLists() { | 237 void ChromeClassTester::BuildBannedLists() { |
| 238 banned_namespaces_.emplace("std"); | 238 banned_namespaces_.emplace("std"); |
| 239 banned_namespaces_.emplace("__gnu_cxx"); | 239 banned_namespaces_.emplace("__gnu_cxx"); |
| 240 | 240 |
| 241 if (options_.enforce_in_thirdparty_webkit) { | 241 if (options_.enforce_in_blink) { |
| 242 allowed_directories_.emplace("/third_party/WebKit/"); | 242 allowed_directories_.emplace("/third_party/WebKit/"); |
| 243 } else { | |
| 244 banned_directories_.emplace("/web/"); | |
| 243 } | 245 } |
|
Avi (use Gerrit)
2017/03/16 00:33:18
To be clear, the first branch of the if() has an i
tkent
2017/03/16 00:35:58
That's right.
I'll add comments.
| |
| 244 | 246 |
| 245 banned_directories_.emplace("/third_party/"); | 247 banned_directories_.emplace("/third_party/"); |
| 246 banned_directories_.emplace("/native_client/"); | 248 banned_directories_.emplace("/native_client/"); |
| 247 banned_directories_.emplace("/breakpad/"); | 249 banned_directories_.emplace("/breakpad/"); |
| 248 banned_directories_.emplace("/courgette/"); | 250 banned_directories_.emplace("/courgette/"); |
| 249 banned_directories_.emplace("/ppapi/"); | 251 banned_directories_.emplace("/ppapi/"); |
| 250 banned_directories_.emplace("/testing/"); | 252 banned_directories_.emplace("/testing/"); |
| 251 banned_directories_.emplace("/v8/"); | 253 banned_directories_.emplace("/v8/"); |
| 252 banned_directories_.emplace("/sdch/"); | 254 banned_directories_.emplace("/sdch/"); |
| 253 banned_directories_.emplace("/frameworks/"); | 255 banned_directories_.emplace("/frameworks/"); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 341 } | 343 } |
| 342 | 344 |
| 343 *filename = ploc.getFilename(); | 345 *filename = ploc.getFilename(); |
| 344 return true; | 346 return true; |
| 345 } | 347 } |
| 346 | 348 |
| 347 DiagnosticsEngine::Level ChromeClassTester::getErrorLevel() { | 349 DiagnosticsEngine::Level ChromeClassTester::getErrorLevel() { |
| 348 return diagnostic().getWarningsAsErrors() ? DiagnosticsEngine::Error | 350 return diagnostic().getWarningsAsErrors() ? DiagnosticsEngine::Error |
| 349 : DiagnosticsEngine::Warning; | 351 : DiagnosticsEngine::Warning; |
| 350 } | 352 } |
| OLD | NEW |