| OLD | NEW | 
|    1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2011 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/test/testing_browser_process.h" |    5 #include "chrome/test/testing_browser_process.h" | 
|    6  |    6  | 
|    7 #include "base/string_util.h" |    7 #include "base/string_util.h" | 
|    8 #include "chrome/browser/google/google_url_tracker.h" |    8 #include "chrome/browser/google/google_url_tracker.h" | 
|    9 #include "chrome/browser/notifications/notification_ui_manager.h" |    9 #include "chrome/browser/notifications/notification_ui_manager.h" | 
|   10 #include "chrome/browser/policy/browser_policy_connector.h" |   10 #include "chrome/browser/policy/browser_policy_connector.h" | 
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  223 ChromeNetLog* TestingBrowserProcess::net_log() { |  223 ChromeNetLog* TestingBrowserProcess::net_log() { | 
|  224   return NULL; |  224   return NULL; | 
|  225 } |  225 } | 
|  226  |  226  | 
|  227 prerender::PrerenderTracker* TestingBrowserProcess::prerender_tracker() { |  227 prerender::PrerenderTracker* TestingBrowserProcess::prerender_tracker() { | 
|  228   if (!prerender_tracker_.get()) |  228   if (!prerender_tracker_.get()) | 
|  229     prerender_tracker_.reset(new prerender::PrerenderTracker()); |  229     prerender_tracker_.reset(new prerender::PrerenderTracker()); | 
|  230   return prerender_tracker_.get(); |  230   return prerender_tracker_.get(); | 
|  231 } |  231 } | 
|  232  |  232  | 
 |  233 MHTMLGenerationManager* TestingBrowserProcess::mhtml_generation_manager() { | 
 |  234   return NULL; | 
 |  235 } | 
 |  236  | 
|  233 void TestingBrowserProcess::SetLocalState(PrefService* local_state) { |  237 void TestingBrowserProcess::SetLocalState(PrefService* local_state) { | 
|  234   if (!local_state && notification_ui_manager_.get()) |  238   if (!local_state && notification_ui_manager_.get()) | 
|  235     notification_ui_manager_.reset();  // Used local_state_. |  239     notification_ui_manager_.reset();  // Used local_state_. | 
|  236   local_state_ = local_state; |  240   local_state_ = local_state; | 
|  237 } |  241 } | 
|  238  |  242  | 
|  239 void TestingBrowserProcess::SetGoogleURLTracker( |  243 void TestingBrowserProcess::SetGoogleURLTracker( | 
|  240     GoogleURLTracker* google_url_tracker) { |  244     GoogleURLTracker* google_url_tracker) { | 
|  241   google_url_tracker_.reset(google_url_tracker); |  245   google_url_tracker_.reset(google_url_tracker); | 
|  242 } |  246 } | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
|  256  |  260  | 
|  257 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() { |  261 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() { | 
|  258   DCHECK_EQ(browser_process_.get(), g_browser_process); |  262   DCHECK_EQ(browser_process_.get(), g_browser_process); | 
|  259  |  263  | 
|  260   // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. |  264   // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. | 
|  261   // After the transition is over, we should just |  265   // After the transition is over, we should just | 
|  262   // reset |g_browser_process| to NULL. |  266   // reset |g_browser_process| to NULL. | 
|  263   browser_process_.reset(); |  267   browser_process_.reset(); | 
|  264   g_browser_process = new TestingBrowserProcess(); |  268   g_browser_process = new TestingBrowserProcess(); | 
|  265 } |  269 } | 
| OLD | NEW |