1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/components/translation/cld2/internal/debug_empty.cc Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,64 @@ 1.4 +// Copyright 2013 Google Inc. All Rights Reserved. 1.5 +// 1.6 +// Licensed under the Apache License, Version 2.0 (the "License"); 1.7 +// you may not use this file except in compliance with the License. 1.8 +// You may obtain a copy of the License at 1.9 +// 1.10 +// http://www.apache.org/licenses/LICENSE-2.0 1.11 +// 1.12 +// Unless required by applicable law or agreed to in writing, software 1.13 +// distributed under the License is distributed on an "AS IS" BASIS, 1.14 +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1.15 +// See the License for the specific language governing permissions and 1.16 +// limitations under the License. 1.17 + 1.18 +// 1.19 +// Author: dsites@google.com (Dick Sites) 1.20 +// Compile this in instead of debug.cc to remove code for debug output 1.21 +// 1.22 + 1.23 +#include "debug.h" 1.24 +#include <string> 1.25 + 1.26 +using namespace std; 1.27 + 1.28 +namespace CLD2 { 1.29 + 1.30 +string GetPlainEscapedText(const string& txt) {return string("");} 1.31 + 1.32 +string GetHtmlEscapedText(const string& txt) {return string("");} 1.33 + 1.34 +string GetColorHtmlEscapedText(Language lang, const string& txt) { 1.35 + return string(""); 1.36 +} 1.37 + 1.38 +string GetLangColorHtmlEscapedText(Language lang, const string& txt) { 1.39 + return string(""); 1.40 +} 1.41 + 1.42 + 1.43 +// For showing one chunk 1.44 +// Print debug output for one scored chunk 1.45 +// Optionally print out per-chunk scoring information 1.46 +// In degenerate cases, hitbuffer and cspan can be NULL 1.47 +void CLD2_Debug(const char* text, 1.48 + int lo_offset, 1.49 + int hi_offset, 1.50 + bool more_to_come, bool score_cjk, 1.51 + const ScoringHitBuffer* hitbuffer, 1.52 + const ScoringContext* scoringcontext, 1.53 + const ChunkSpan* cspan, 1.54 + const ChunkSummary* chunksummary) {} 1.55 + 1.56 +// For showing all chunks 1.57 +void CLD2_Debug2(const char* text, 1.58 + bool more_to_come, bool score_cjk, 1.59 + const ScoringHitBuffer* hitbuffer, 1.60 + const ScoringContext* scoringcontext, 1.61 + const SummaryBuffer* summarybuffer) {} 1.62 + 1.63 +void DumpResultChunkVector(FILE* f, const char* src, 1.64 + ResultChunkVector* resultchunkvector) {} 1.65 + 1.66 +} // End namespace CLD2 1.67 +