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

Side by Side Diff: chrome/browser/rlz/rlz_extension_apitest.cc

Issue 10071036: RefCounted types should not have public destructors, chrome/browser/ part 6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implementation fixes Created 8 years, 8 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 <map> 5 #include <map>
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/extensions/extension_function.h" 8 #include "chrome/browser/extensions/extension_function.h"
9 #include "chrome/browser/extensions/extension_function_dispatcher.h" 9 #include "chrome/browser/extensions/extension_function_dispatcher.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
11 #include "chrome/browser/rlz/rlz_extension_api.h" 11 #include "chrome/browser/rlz/rlz_extension_api.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 #include "chrome/common/extensions/extension.h" 13 #include "chrome/common/extensions/extension.h"
14 #include "net/base/mock_host_resolver.h" 14 #include "net/base/mock_host_resolver.h"
15 #include "rlz/lib/rlz_lib.h" 15 #include "rlz/lib/rlz_lib.h"
16 16
17 #if (OS_WIN) 17 #if (OS_WIN)
18 #include "base/win/registry.h" 18 #include "base/win/registry.h"
19 #endif 19 #endif
20 20
21 class MockRlzSendFinancialPingFunction : public RlzSendFinancialPingFunction { 21 class MockRlzSendFinancialPingFunction : public RlzSendFinancialPingFunction {
22 virtual bool RunImpl();
23
24 static int expected_count_;
25
26 public: 22 public:
27 static int expected_count() { 23 static int expected_count() {
28 return expected_count_; 24 return expected_count_;
29 } 25 }
26
27 protected:
28 virtual ~MockRlzSendFinancialPingFunction() {}
29
30 // ExtensionFunction
31 virtual bool RunImpl() OVERRIDE;
32
33 private:
34 static int expected_count_;
30 }; 35 };
31 36
32 int MockRlzSendFinancialPingFunction::expected_count_ = 0; 37 int MockRlzSendFinancialPingFunction::expected_count_ = 0;
33 38
34 bool MockRlzSendFinancialPingFunction::RunImpl() { 39 bool MockRlzSendFinancialPingFunction::RunImpl() {
35 EXPECT_TRUE(RlzSendFinancialPingFunction::RunImpl()); 40 EXPECT_TRUE(RlzSendFinancialPingFunction::RunImpl());
36 ++expected_count_; 41 ++expected_count_;
37 return true; 42 return true;
38 } 43 }
39 44
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ASSERT_EQ(1, value); 112 ASSERT_EQ(1, value);
108 113
109 key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\D", 114 key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\D",
110 KEY_READ); 115 KEY_READ);
111 ASSERT_FALSE(key.Valid()); 116 ASSERT_FALSE(key.Valid());
112 #endif 117 #endif
113 118
114 // Cleanup. 119 // Cleanup.
115 rlz_lib::ClearProductState(rlz_lib::PINYIN_IME, access_points); 120 rlz_lib::ClearProductState(rlz_lib::PINYIN_IME, access_points);
116 } 121 }
OLDNEW
« no previous file with comments | « chrome/browser/rlz/rlz_extension_api.h ('k') | chrome/browser/search_engines/search_provider_install_state_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698