Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: trunk/src/chrome/renderer/translate/translate_helper.cc

Issue 474483002: Revert 289312 "Move StringToUpperASCII and LowerCaseEqualsASCII ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/renderer/translate/translate_helper.h" 5 #include "chrome/renderer/translate/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/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 // Check if the tag contains name="google". 362 // Check if the tag contains name="google".
363 WebString attribute = element.getAttribute(name); 363 WebString attribute = element.getAttribute(name);
364 if (attribute.isNull() || attribute != google) 364 if (attribute.isNull() || attribute != google)
365 continue; 365 continue;
366 // Check if the tag contains value="notranslate", or content="notranslate". 366 // Check if the tag contains value="notranslate", or content="notranslate".
367 attribute = element.getAttribute(value); 367 attribute = element.getAttribute(value);
368 if (attribute.isNull()) 368 if (attribute.isNull())
369 attribute = element.getAttribute(content); 369 attribute = element.getAttribute(content);
370 if (attribute.isNull()) 370 if (attribute.isNull())
371 continue; 371 continue;
372 if (base::LowerCaseEqualsASCII(base::string16(attribute), "notranslate")) 372 if (LowerCaseEqualsASCII(attribute, "notranslate"))
373 return false; 373 return false;
374 } 374 }
375 return true; 375 return true;
376 } 376 }
377 377
378 bool TranslateHelper::OnMessageReceived(const IPC::Message& message) { 378 bool TranslateHelper::OnMessageReceived(const IPC::Message& message) {
379 bool handled = true; 379 bool handled = true;
380 IPC_BEGIN_MESSAGE_MAP(TranslateHelper, message) 380 IPC_BEGIN_MESSAGE_MAP(TranslateHelper, message)
381 IPC_MESSAGE_HANDLER(ChromeViewMsg_TranslatePage, OnTranslatePage) 381 IPC_MESSAGE_HANDLER(ChromeViewMsg_TranslatePage, OnTranslatePage)
382 IPC_MESSAGE_HANDLER(ChromeViewMsg_RevertTranslation, OnRevertTranslation) 382 IPC_MESSAGE_HANDLER(ChromeViewMsg_RevertTranslation, OnRevertTranslation)
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 // be DEFERRED until CLD is ready. In the latter case, CLD is in dynamic mode 646 // be DEFERRED until CLD is ready. In the latter case, CLD is in dynamic mode
647 // and may eventually become available, triggering the RESUMED event; after 647 // and may eventually become available, triggering the RESUMED event; after
648 // this, everything should start being ON_TIME. This should never run more 648 // this, everything should start being ON_TIME. This should never run more
649 // than twice in a page load, under any conditions. 649 // than twice in a page load, under any conditions.
650 // Also note that language detection is triggered off of a delay AFTER the 650 // Also note that language detection is triggered off of a delay AFTER the
651 // page load completed event has fired, making this very much off the critical 651 // page load completed event has fired, making this very much off the critical
652 // path. 652 // path.
653 content::RenderThread::Get()->UpdateHistograms( 653 content::RenderThread::Get()->UpdateHistograms(
654 content::kHistogramSynchronizerReservedSequenceNumber); 654 content::kHistogramSynchronizerReservedSequenceNumber);
655 } 655 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/renderer/extensions/webstore_bindings.cc ('k') | trunk/src/chrome/renderer/web_apps.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698