| OLD | NEW |
| 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/browser/sync/glue/chrome_extensions_activity_monitor.h" | 5 #include "chrome/browser/sync/glue/chrome_extensions_activity_monitor.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/bookmarks/bookmark_extension_api.h" | 11 #include "chrome/browser/bookmarks/bookmark_extension_api.h" |
| 12 #include "chrome/common/chrome_notification_types.h" | 12 #include "chrome/common/chrome_notification_types.h" |
| 13 #include "chrome/common/chrome_paths.h" | 13 #include "chrome/common/chrome_paths.h" |
| 14 #include "chrome/common/extensions/extension.h" | 14 #include "chrome/common/extensions/extension.h" |
| 15 #include "chrome/common/extensions/extension_manifest_constants.h" | 15 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 16 #include "content/public/browser/notification_service.h" | 16 #include "content/public/browser/notification_service.h" |
| 17 #include "content/test/test_browser_thread.h" | 17 #include "content/test/test_browser_thread.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 | 19 |
| 20 using extensions::Extension; |
| 21 |
| 20 namespace browser_sync { | 22 namespace browser_sync { |
| 21 | 23 |
| 22 namespace { | 24 namespace { |
| 23 | 25 |
| 24 using content::BrowserThread; | 26 using content::BrowserThread; |
| 25 namespace keys = extension_manifest_keys; | 27 namespace keys = extension_manifest_keys; |
| 26 | 28 |
| 27 // Create and return an extension with the given path. | 29 // Create and return an extension with the given path. |
| 28 scoped_refptr<Extension> MakeExtension(const std::string& name) { | 30 scoped_refptr<Extension> MakeExtension(const std::string& name) { |
| 29 FilePath path; | 31 FilePath path; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 FireBookmarksApiEvent<CreateBookmarkFunction>(extension1_, 3); | 158 FireBookmarksApiEvent<CreateBookmarkFunction>(extension1_, 3); |
| 157 monitor_.GetAndClearRecords(&results); | 159 monitor_.GetAndClearRecords(&results); |
| 158 | 160 |
| 159 EXPECT_EQ(1U, results.size()); | 161 EXPECT_EQ(1U, results.size()); |
| 160 EXPECT_EQ(3U, results[id1_].bookmark_write_count); | 162 EXPECT_EQ(3U, results[id1_].bookmark_write_count); |
| 161 } | 163 } |
| 162 | 164 |
| 163 } // namespace | 165 } // namespace |
| 164 | 166 |
| 165 } // namespace browser_sync | 167 } // namespace browser_sync |
| OLD | NEW |