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 "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 <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 return local_state_.get(); | 408 return local_state_.get(); |
409 } | 409 } |
410 | 410 |
411 net::URLRequestContextGetter* BrowserProcessImpl::system_request_context() { | 411 net::URLRequestContextGetter* BrowserProcessImpl::system_request_context() { |
412 DCHECK(CalledOnValidThread()); | 412 DCHECK(CalledOnValidThread()); |
413 return io_thread()->system_url_request_context_getter(); | 413 return io_thread()->system_url_request_context_getter(); |
414 } | 414 } |
415 | 415 |
416 chrome_variations::VariationsService* BrowserProcessImpl::variations_service() { | 416 chrome_variations::VariationsService* BrowserProcessImpl::variations_service() { |
417 DCHECK(CalledOnValidThread()); | 417 DCHECK(CalledOnValidThread()); |
418 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_ANDROID) | |
419 if (!variations_service_.get()) | 418 if (!variations_service_.get()) |
420 variations_service_.reset(new chrome_variations::VariationsService()); | 419 variations_service_.reset(chrome_variations::VariationsService::Create()); |
421 #endif | |
422 return variations_service_.get(); | 420 return variations_service_.get(); |
423 } | 421 } |
424 | 422 |
425 #if defined(OS_CHROMEOS) | 423 #if defined(OS_CHROMEOS) |
426 chromeos::OomPriorityManager* BrowserProcessImpl::oom_priority_manager() { | 424 chromeos::OomPriorityManager* BrowserProcessImpl::oom_priority_manager() { |
427 DCHECK(CalledOnValidThread()); | 425 DCHECK(CalledOnValidThread()); |
428 if (!oom_priority_manager_.get()) | 426 if (!oom_priority_manager_.get()) |
429 oom_priority_manager_.reset(new chromeos::OomPriorityManager()); | 427 oom_priority_manager_.reset(new chromeos::OomPriorityManager()); |
430 return oom_priority_manager_.get(); | 428 return oom_priority_manager_.get(); |
431 } | 429 } |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 } | 959 } |
962 | 960 |
963 void BrowserProcessImpl::OnAutoupdateTimer() { | 961 void BrowserProcessImpl::OnAutoupdateTimer() { |
964 if (CanAutorestartForUpdate()) { | 962 if (CanAutorestartForUpdate()) { |
965 DLOG(WARNING) << "Detected update. Restarting browser."; | 963 DLOG(WARNING) << "Detected update. Restarting browser."; |
966 RestartBackgroundInstance(); | 964 RestartBackgroundInstance(); |
967 } | 965 } |
968 } | 966 } |
969 | 967 |
970 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 968 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |