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

Side by Side Diff: chrome/test/testing_browser_process.cc

Issue 7044095: Hooking MHTML generation to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor clean-up Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
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 "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "chrome/browser/download/mhtml_generation_manager.h"
9 #include "chrome/browser/google/google_url_tracker.h" 10 #include "chrome/browser/google/google_url_tracker.h"
10 #include "chrome/browser/notifications/notification_ui_manager.h" 11 #include "chrome/browser/notifications/notification_ui_manager.h"
11 #include "chrome/browser/policy/browser_policy_connector.h" 12 #include "chrome/browser/policy/browser_policy_connector.h"
12 #include "chrome/browser/prefs/pref_service.h" 13 #include "chrome/browser/prefs/pref_service.h"
13 #include "chrome/browser/prerender/prerender_tracker.h" 14 #include "chrome/browser/prerender/prerender_tracker.h"
14 #include "chrome/browser/printing/background_printing_manager.h" 15 #include "chrome/browser/printing/background_printing_manager.h"
15 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
16 #include "net/url_request/url_request_context_getter.h" 17 #include "net/url_request/url_request_context_getter.h"
17 #include "ui/base/clipboard/clipboard.h" 18 #include "ui/base/clipboard/clipboard.h"
18 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 ChromeNetLog* TestingBrowserProcess::net_log() { 230 ChromeNetLog* TestingBrowserProcess::net_log() {
230 return NULL; 231 return NULL;
231 } 232 }
232 233
233 prerender::PrerenderTracker* TestingBrowserProcess::prerender_tracker() { 234 prerender::PrerenderTracker* TestingBrowserProcess::prerender_tracker() {
234 if (!prerender_tracker_.get()) 235 if (!prerender_tracker_.get())
235 prerender_tracker_.reset(new prerender::PrerenderTracker()); 236 prerender_tracker_.reset(new prerender::PrerenderTracker());
236 return prerender_tracker_.get(); 237 return prerender_tracker_.get();
237 } 238 }
238 239
240 MHTMLGenerationManager* TestingBrowserProcess::mhtml_generation_manager() {
241 if (!mhtml_generation_manager_.get())
Paweł Hajdan Jr. 2011/06/11 18:04:45 nit: Do we need this code in TestingBrowserProcess
Jay Civelli 2011/06/13 22:45:41 Ah, good point, now returning NULL.
242 mhtml_generation_manager_.reset(new MHTMLGenerationManager());
243 return mhtml_generation_manager_.get();
244 }
245
239 void TestingBrowserProcess::SetLocalState(PrefService* local_state) { 246 void TestingBrowserProcess::SetLocalState(PrefService* local_state) {
240 if (!local_state && notification_ui_manager_.get()) 247 if (!local_state && notification_ui_manager_.get())
241 notification_ui_manager_.reset(); // Used local_state_. 248 notification_ui_manager_.reset(); // Used local_state_.
242 local_state_ = local_state; 249 local_state_ = local_state;
243 } 250 }
244 251
245 void TestingBrowserProcess::SetGoogleURLTracker( 252 void TestingBrowserProcess::SetGoogleURLTracker(
246 GoogleURLTracker* google_url_tracker) { 253 GoogleURLTracker* google_url_tracker) {
247 google_url_tracker_.reset(google_url_tracker); 254 google_url_tracker_.reset(google_url_tracker);
248 } 255 }
(...skipping 13 matching lines...) Expand all
262 269
263 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() { 270 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() {
264 DCHECK_EQ(browser_process_.get(), g_browser_process); 271 DCHECK_EQ(browser_process_.get(), g_browser_process);
265 272
266 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. 273 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062.
267 // After the transition is over, we should just 274 // After the transition is over, we should just
268 // reset |g_browser_process| to NULL. 275 // reset |g_browser_process| to NULL.
269 browser_process_.reset(); 276 browser_process_.reset();
270 g_browser_process = new TestingBrowserProcess(); 277 g_browser_process = new TestingBrowserProcess();
271 } 278 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698