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

Side by Side Diff: components/translate/core/browser/translate_manager.cc

Issue 378253002: Fix translate namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/core/browser/translate_manager.h" 5 #include "components/translate/core/browser/translate_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 13 matching lines...) Expand all
24 #include "components/translate/core/browser/translate_prefs.h" 24 #include "components/translate/core/browser/translate_prefs.h"
25 #include "components/translate/core/browser/translate_script.h" 25 #include "components/translate/core/browser/translate_script.h"
26 #include "components/translate/core/browser/translate_url_util.h" 26 #include "components/translate/core/browser/translate_url_util.h"
27 #include "components/translate/core/common/language_detection_details.h" 27 #include "components/translate/core/common/language_detection_details.h"
28 #include "components/translate/core/common/translate_constants.h" 28 #include "components/translate/core/common/translate_constants.h"
29 #include "components/translate/core/common/translate_pref_names.h" 29 #include "components/translate/core/common/translate_pref_names.h"
30 #include "components/translate/core/common/translate_switches.h" 30 #include "components/translate/core/common/translate_switches.h"
31 #include "net/base/url_util.h" 31 #include "net/base/url_util.h"
32 #include "net/http/http_status_code.h" 32 #include "net/http/http_status_code.h"
33 33
34 namespace translate {
35
34 namespace { 36 namespace {
35 37
36 // Callbacks for translate errors. 38 // Callbacks for translate errors.
37 TranslateManager::TranslateErrorCallbackList* g_callback_list_ = NULL; 39 TranslateManager::TranslateErrorCallbackList* g_callback_list_ = NULL;
38 40
39 const char kReportLanguageDetectionErrorURL[] = 41 const char kReportLanguageDetectionErrorURL[] =
40 "https://translate.google.com/translate_error?client=cr&action=langidc"; 42 "https://translate.google.com/translate_error?client=cr&action=langidc";
41 43
42 // Used in kReportLanguageDetectionErrorURL to specify the original page 44 // Used in kReportLanguageDetectionErrorURL to specify the original page
43 // language. 45 // language.
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 TranslateDownloadManager::GetLanguageCode(auto_target_lang); 382 TranslateDownloadManager::GetLanguageCode(auto_target_lang);
381 if (TranslateDownloadManager::IsSupportedLanguage(auto_target_lang)) 383 if (TranslateDownloadManager::IsSupportedLanguage(auto_target_lang))
382 return auto_target_lang; 384 return auto_target_lang;
383 } 385 }
384 return std::string(); 386 return std::string();
385 } 387 }
386 388
387 LanguageState& TranslateManager::GetLanguageState() { 389 LanguageState& TranslateManager::GetLanguageState() {
388 return language_state_; 390 return language_state_;
389 } 391 }
392
393 } // namespace translate
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698