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

Side by Side Diff: components/nacl/browser/test_nacl_browser_delegate.h

Issue 2630443003: Add thread checks to NaClBrowser, and make it leaky (Closed)
Patch Set: Update NaClGdbDebugStubTest Created 3 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef COMPONENTS_NACL_BROWSER_TEST_NACL_BROWSER_DELEGATE_H_ 5 #ifndef COMPONENTS_NACL_BROWSER_TEST_NACL_BROWSER_DELEGATE_H_
6 #define COMPONENTS_NACL_BROWSER_TEST_NACL_BROWSER_DELEGATE_H_ 6 #define COMPONENTS_NACL_BROWSER_TEST_NACL_BROWSER_DELEGATE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "components/nacl/browser/nacl_browser_delegate.h" 10 #include "components/nacl/browser/nacl_browser_delegate.h"
11 11
12 // This is a base test implementation of NaClBrowserDelegate which 12 // This is a base test implementation of NaClBrowserDelegate which
13 // does nothing. Individual tests can override the methods further. 13 // does nothing. Individual tests can override the methods further.
14 // To use the test delegate: 14 // To use the test delegate:
15 // 15 //
16 // NaClBrowser::SetDelegate(new RefinedTestNaClBrowserDelegate); 16 // NaClBrowser::SetDelegate(new RefinedTestNaClBrowserDelegate);
17 // 17 //
18 // and 18 // and
19 // 19 //
20 // NaClBrowser::SetDelegate(NULL); // frees the test delegate. 20 // NaClBrowser::ClearAndDeleteDelegateForTest();
21 class TestNaClBrowserDelegate : public NaClBrowserDelegate { 21 class TestNaClBrowserDelegate : public NaClBrowserDelegate {
22 public: 22 public:
23 TestNaClBrowserDelegate(); 23 TestNaClBrowserDelegate();
24 ~TestNaClBrowserDelegate() override; 24 ~TestNaClBrowserDelegate() override;
25 void ShowMissingArchInfobar(int render_process_id, 25 void ShowMissingArchInfobar(int render_process_id,
26 int render_view_id) override; 26 int render_view_id) override;
27 bool DialogsAreSuppressed() override; 27 bool DialogsAreSuppressed() override;
28 bool GetCacheDirectory(base::FilePath* cache_dir) override; 28 bool GetCacheDirectory(base::FilePath* cache_dir) override;
29 bool GetPluginDirectory(base::FilePath* plugin_dir) override; 29 bool GetPluginDirectory(base::FilePath* plugin_dir) override;
30 bool GetPnaclDirectory(base::FilePath* pnacl_dir) override; 30 bool GetPnaclDirectory(base::FilePath* pnacl_dir) override;
(...skipping 10 matching lines...) Expand all
41 content::BrowserPpapiHost::OnKeepaliveCallback GetOnKeepaliveCallback() 41 content::BrowserPpapiHost::OnKeepaliveCallback GetOnKeepaliveCallback()
42 override; 42 override;
43 bool IsNonSfiModeAllowed(const base::FilePath& profile_directory, 43 bool IsNonSfiModeAllowed(const base::FilePath& profile_directory,
44 const GURL& manifest_url) override; 44 const GURL& manifest_url) override;
45 45
46 private: 46 private:
47 DISALLOW_COPY_AND_ASSIGN(TestNaClBrowserDelegate); 47 DISALLOW_COPY_AND_ASSIGN(TestNaClBrowserDelegate);
48 }; 48 };
49 49
50 #endif // COMPONENTS_NACL_BROWSER_TEST_NACL_BROWSER_DELEGATE_H_ 50 #endif // COMPONENTS_NACL_BROWSER_TEST_NACL_BROWSER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698