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

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 145023015: Introduce TranslateService and TranslateDownloadManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove DCHECK for request context Created 6 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #include "chrome/common/chrome_paths.h" 74 #include "chrome/common/chrome_paths.h"
75 #include "chrome/common/chrome_switches.h" 75 #include "chrome/common/chrome_switches.h"
76 #include "chrome/common/extensions/chrome_extensions_client.h" 76 #include "chrome/common/extensions/chrome_extensions_client.h"
77 #include "chrome/common/extensions/extension_l10n_util.h" 77 #include "chrome/common/extensions/extension_l10n_util.h"
78 #include "chrome/common/pref_names.h" 78 #include "chrome/common/pref_names.h"
79 #include "chrome/common/profile_management_switches.h" 79 #include "chrome/common/profile_management_switches.h"
80 #include "chrome/common/switch_utils.h" 80 #include "chrome/common/switch_utils.h"
81 #include "chrome/common/url_constants.h" 81 #include "chrome/common/url_constants.h"
82 #include "chrome/installer/util/google_update_constants.h" 82 #include "chrome/installer/util/google_update_constants.h"
83 #include "components/policy/core/common/policy_service.h" 83 #include "components/policy/core/common/policy_service.h"
84 #include "components/translate/core/browser/translate_download_manager.h"
84 #include "content/public/browser/browser_thread.h" 85 #include "content/public/browser/browser_thread.h"
85 #include "content/public/browser/child_process_security_policy.h" 86 #include "content/public/browser/child_process_security_policy.h"
86 #include "content/public/browser/notification_details.h" 87 #include "content/public/browser/notification_details.h"
87 #include "content/public/browser/plugin_service.h" 88 #include "content/public/browser/plugin_service.h"
88 #include "content/public/browser/render_process_host.h" 89 #include "content/public/browser/render_process_host.h"
89 #include "content/public/browser/resource_dispatcher_host.h" 90 #include "content/public/browser/resource_dispatcher_host.h"
90 #include "extensions/common/constants.h" 91 #include "extensions/common/constants.h"
91 #include "net/socket/client_socket_pool_manager.h" 92 #include "net/socket/client_socket_pool_manager.h"
92 #include "net/url_request/url_request_context_getter.h" 93 #include "net/url_request/url_request_context_getter.h"
93 #include "ui/base/l10n/l10n_util.h" 94 #include "ui/base/l10n/l10n_util.h"
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 630
630 const std::string& BrowserProcessImpl::GetApplicationLocale() { 631 const std::string& BrowserProcessImpl::GetApplicationLocale() {
631 DCHECK(!locale_.empty()); 632 DCHECK(!locale_.empty());
632 return locale_; 633 return locale_;
633 } 634 }
634 635
635 void BrowserProcessImpl::SetApplicationLocale(const std::string& locale) { 636 void BrowserProcessImpl::SetApplicationLocale(const std::string& locale) {
636 locale_ = locale; 637 locale_ = locale;
637 extension_l10n_util::SetProcessLocale(locale); 638 extension_l10n_util::SetProcessLocale(locale);
638 chrome::ChromeContentBrowserClient::SetApplicationLocale(locale); 639 chrome::ChromeContentBrowserClient::SetApplicationLocale(locale);
640 TranslateDownloadManager::GetInstance()->set_application_locale(locale);
droger 2014/01/28 14:16:48 This line can be removed if we assume that the loc
blundell 2014/01/29 12:25:13 I think that this line should stay -- it does no h
639 } 641 }
640 642
641 DownloadStatusUpdater* BrowserProcessImpl::download_status_updater() { 643 DownloadStatusUpdater* BrowserProcessImpl::download_status_updater() {
642 return download_status_updater_.get(); 644 return download_status_updater_.get();
643 } 645 }
644 646
645 BookmarkPromptController* BrowserProcessImpl::bookmark_prompt_controller() { 647 BookmarkPromptController* BrowserProcessImpl::bookmark_prompt_controller() {
646 #if defined(OS_ANDROID) 648 #if defined(OS_ANDROID)
647 return NULL; 649 return NULL;
648 #else 650 #else
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 } 1120 }
1119 1121
1120 void BrowserProcessImpl::OnAutoupdateTimer() { 1122 void BrowserProcessImpl::OnAutoupdateTimer() {
1121 if (CanAutorestartForUpdate()) { 1123 if (CanAutorestartForUpdate()) {
1122 DLOG(WARNING) << "Detected update. Restarting browser."; 1124 DLOG(WARNING) << "Detected update. Restarting browser.";
1123 RestartBackgroundInstance(); 1125 RestartBackgroundInstance();
1124 } 1126 }
1125 } 1127 }
1126 1128
1127 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1129 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698