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

Side by Side Diff: chrome/test/base/in_process_browser_test.cc

Issue 10891016: Remove all callers of Profile::GetResourceContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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) 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/test/base/in_process_browser_test.h" 5 #include "chrome/test/base/in_process_browser_test.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 20 matching lines...) Expand all
31 #include "chrome/common/logging_chrome.h" 31 #include "chrome/common/logging_chrome.h"
32 #include "chrome/common/url_constants.h" 32 #include "chrome/common/url_constants.h"
33 #include "chrome/renderer/chrome_content_renderer_client.h" 33 #include "chrome/renderer/chrome_content_renderer_client.h"
34 #include "chrome/test/base/chrome_test_suite.h" 34 #include "chrome/test/base/chrome_test_suite.h"
35 #include "chrome/test/base/test_launcher_utils.h" 35 #include "chrome/test/base/test_launcher_utils.h"
36 #include "chrome/test/base/testing_browser_process.h" 36 #include "chrome/test/base/testing_browser_process.h"
37 #include "chrome/test/base/ui_test_utils.h" 37 #include "chrome/test/base/ui_test_utils.h"
38 #include "content/public/browser/notification_service.h" 38 #include "content/public/browser/notification_service.h"
39 #include "content/public/browser/notification_types.h" 39 #include "content/public/browser/notification_types.h"
40 #include "content/public/browser/render_process_host.h" 40 #include "content/public/browser/render_process_host.h"
41 #include "content/public/browser/storage_partition.h"
41 #include "content/public/test/browser_test_utils.h" 42 #include "content/public/test/browser_test_utils.h"
42 #include "content/public/test/test_browser_thread.h" 43 #include "content/public/test/test_browser_thread.h"
43 #include "content/public/test/test_launcher.h" 44 #include "content/public/test/test_launcher.h"
44 #include "net/base/mock_host_resolver.h" 45 #include "net/base/mock_host_resolver.h"
45 #include "net/test/test_server.h" 46 #include "net/test/test_server.h"
46 #include "ui/compositor/compositor_switches.h" 47 #include "ui/compositor/compositor_switches.h"
47 48
48 #if defined(OS_CHROMEOS) 49 #if defined(OS_CHROMEOS)
49 #include "chrome/browser/chromeos/audio/audio_handler.h" 50 #include "chrome/browser/chromeos/audio/audio_handler.h"
50 #elif defined(OS_MACOSX) 51 #elif defined(OS_MACOSX)
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 void InProcessBrowserTest::TearDown() { 208 void InProcessBrowserTest::TearDown() {
208 DCHECK(!g_browser_process); 209 DCHECK(!g_browser_process);
209 BrowserTestBase::TearDown(); 210 BrowserTestBase::TearDown();
210 } 211 }
211 212
212 content::BrowserContext* InProcessBrowserTest::GetBrowserContext() { 213 content::BrowserContext* InProcessBrowserTest::GetBrowserContext() {
213 return browser_->profile(); 214 return browser_->profile();
214 } 215 }
215 216
216 content::ResourceContext* InProcessBrowserTest::GetResourceContext() { 217 content::ResourceContext* InProcessBrowserTest::GetResourceContext() {
217 return browser_->profile()->GetResourceContext(); 218 return content::BrowserContext::GetDefaultStoragePartition(
219 browser_->profile())->GetResourceContext();
218 } 220 }
219 221
220 void InProcessBrowserTest::AddTabAtIndexToBrowser( 222 void InProcessBrowserTest::AddTabAtIndexToBrowser(
221 Browser* browser, 223 Browser* browser,
222 int index, 224 int index,
223 const GURL& url, 225 const GURL& url,
224 content::PageTransition transition) { 226 content::PageTransition transition) {
225 chrome::NavigateParams params(browser, url, transition); 227 chrome::NavigateParams params(browser, url, transition);
226 params.tabstrip_index = index; 228 params.tabstrip_index = index;
227 params.disposition = NEW_FOREGROUND_TAB; 229 params.disposition = NEW_FOREGROUND_TAB;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 // On the Mac, this eventually reaches 381 // On the Mac, this eventually reaches
380 // -[BrowserWindowController windowWillClose:], which will post a deferred 382 // -[BrowserWindowController windowWillClose:], which will post a deferred
381 // -autorelease on itself to ultimately destroy the Browser object. The line 383 // -autorelease on itself to ultimately destroy the Browser object. The line
382 // below is necessary to pump these pending messages to ensure all Browsers 384 // below is necessary to pump these pending messages to ensure all Browsers
383 // get deleted. 385 // get deleted.
384 content::RunAllPendingInMessageLoop(); 386 content::RunAllPendingInMessageLoop();
385 delete autorelease_pool_; 387 delete autorelease_pool_;
386 autorelease_pool_ = NULL; 388 autorelease_pool_ = NULL;
387 #endif 389 #endif
388 } 390 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/plugin_info_message_filter.cc ('k') | chrome/test/base/testing_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698