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 "components/translate/content/renderer/translate_helper.h" | 5 #include "components/translate/content/renderer/translate_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // Check if the tag contains name="google". | 109 // Check if the tag contains name="google". |
110 WebString attribute = element.getAttribute(name); | 110 WebString attribute = element.getAttribute(name); |
111 if (attribute.isNull() || attribute != google) | 111 if (attribute.isNull() || attribute != google) |
112 continue; | 112 continue; |
113 // Check if the tag contains value="notranslate", or content="notranslate". | 113 // Check if the tag contains value="notranslate", or content="notranslate". |
114 attribute = element.getAttribute(value); | 114 attribute = element.getAttribute(value); |
115 if (attribute.isNull()) | 115 if (attribute.isNull()) |
116 attribute = element.getAttribute(content); | 116 attribute = element.getAttribute(content); |
117 if (attribute.isNull()) | 117 if (attribute.isNull()) |
118 continue; | 118 continue; |
119 if (LowerCaseEqualsASCII(attribute, "notranslate")) | 119 if (base::LowerCaseEqualsASCII(attribute, "notranslate")) |
120 return true; | 120 return true; |
121 } | 121 } |
122 return false; | 122 return false; |
123 } | 123 } |
124 | 124 |
125 } // namespace | 125 } // namespace |
126 | 126 |
127 namespace translate { | 127 namespace translate { |
128 | 128 |
129 //////////////////////////////////////////////////////////////////////////////// | 129 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 // this, everything should start being ON_TIME. This should never run more | 656 // this, everything should start being ON_TIME. This should never run more |
657 // than twice in a page load, under any conditions. | 657 // than twice in a page load, under any conditions. |
658 // Also note that language detection is triggered off of a delay AFTER the | 658 // Also note that language detection is triggered off of a delay AFTER the |
659 // page load completed event has fired, making this very much off the critical | 659 // page load completed event has fired, making this very much off the critical |
660 // path. | 660 // path. |
661 content::RenderThread::Get()->UpdateHistograms( | 661 content::RenderThread::Get()->UpdateHistograms( |
662 content::kHistogramSynchronizerReservedSequenceNumber); | 662 content::kHistogramSynchronizerReservedSequenceNumber); |
663 } | 663 } |
664 | 664 |
665 } // namespace translate | 665 } // namespace translate |
OLD | NEW |