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

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: Style fixes 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())
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 local_state_ = local_state; 247 local_state_ = local_state;
241 } 248 }
242 249
243 void TestingBrowserProcess::SetGoogleURLTracker( 250 void TestingBrowserProcess::SetGoogleURLTracker(
244 GoogleURLTracker* google_url_tracker) { 251 GoogleURLTracker* google_url_tracker) {
245 google_url_tracker_.reset(google_url_tracker); 252 google_url_tracker_.reset(google_url_tracker);
246 } 253 }
247 254
248 ScopedTestingBrowserProcess::ScopedTestingBrowserProcess() { 255 ScopedTestingBrowserProcess::ScopedTestingBrowserProcess() {
(...skipping 11 matching lines...) Expand all
260 267
261 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() { 268 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() {
262 DCHECK_EQ(browser_process_.get(), g_browser_process); 269 DCHECK_EQ(browser_process_.get(), g_browser_process);
263 270
264 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. 271 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062.
265 // After the transition is over, we should just 272 // After the transition is over, we should just
266 // reset |g_browser_process| to NULL. 273 // reset |g_browser_process| to NULL.
267 browser_process_.reset(); 274 browser_process_.reset();
268 g_browser_process = new TestingBrowserProcess(); 275 g_browser_process = new TestingBrowserProcess();
269 } 276 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698