| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // An implementation of BrowserProcess for unit tests that fails for most | 5 // An implementation of BrowserProcess for unit tests that fails for most |
| 6 // services. By preventing creation of services, we reduce dependencies and | 6 // services. By preventing creation of services, we reduce dependencies and |
| 7 // keep the profile clean. Clients of this class must handle the NULL return | 7 // keep the profile clean. Clients of this class must handle the NULL return |
| 8 // value, however. | 8 // value, however. |
| 9 | 9 |
| 10 #ifndef CHROME_TEST_TESTING_BROWSER_PROCESS_H_ | 10 #ifndef CHROME_TEST_TESTING_BROWSER_PROCESS_H_ |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 115 |
| 116 virtual const std::wstring& GetApplicationLocale() { | 116 virtual const std::wstring& GetApplicationLocale() { |
| 117 static std::wstring* value = NULL; | 117 static std::wstring* value = NULL; |
| 118 if (!value) | 118 if (!value) |
| 119 value = new std::wstring(L"en"); | 119 value = new std::wstring(L"en"); |
| 120 return *value; | 120 return *value; |
| 121 } | 121 } |
| 122 | 122 |
| 123 virtual MemoryModel memory_model() { return HIGH_MEMORY_MODEL; } | 123 virtual MemoryModel memory_model() { return HIGH_MEMORY_MODEL; } |
| 124 | 124 |
| 125 virtual base::WaitableEvent* shutdown_event() { return shutdown_event_.get();
} | 125 virtual base::WaitableEvent* shutdown_event() { |
| 126 return shutdown_event_.get(); |
| 127 } |
| 126 | 128 |
| 127 private: | 129 private: |
| 128 NotificationService notification_service_; | 130 NotificationService notification_service_; |
| 129 scoped_ptr<base::WaitableEvent> shutdown_event_; | 131 scoped_ptr<base::WaitableEvent> shutdown_event_; |
| 130 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); | 132 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); |
| 131 }; | 133 }; |
| 132 | 134 |
| 133 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_ | 135 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_ |
| OLD | NEW |