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

Side by Side Diff: chrome/browser/autocomplete/shortcuts_provider_unittest.cc

Issue 12211105: Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, merge to LKGR. Created 7 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 | 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/browser/autocomplete/shortcuts_provider.h" 5 #include "chrome/browser/autocomplete/shortcuts_provider.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <functional> 10 #include <functional>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/message_loop.h" 16 #include "base/message_loop.h"
17 #include "base/prefs/pref_service.h"
17 #include "base/stringprintf.h" 18 #include "base/stringprintf.h"
18 #include "base/utf_string_conversions.h" 19 #include "base/utf_string_conversions.h"
19 #include "chrome/browser/autocomplete/autocomplete_input.h" 20 #include "chrome/browser/autocomplete/autocomplete_input.h"
20 #include "chrome/browser/autocomplete/autocomplete_match.h" 21 #include "chrome/browser/autocomplete/autocomplete_match.h"
21 #include "chrome/browser/autocomplete/autocomplete_provider.h" 22 #include "chrome/browser/autocomplete/autocomplete_provider.h"
22 #include "chrome/browser/autocomplete/autocomplete_provider_listener.h" 23 #include "chrome/browser/autocomplete/autocomplete_provider_listener.h"
23 #include "chrome/browser/history/history_service.h" 24 #include "chrome/browser/history/history_service.h"
24 #include "chrome/browser/history/in_memory_url_index.h" 25 #include "chrome/browser/history/in_memory_url_index.h"
25 #include "chrome/browser/history/shortcuts_backend.h" 26 #include "chrome/browser/history/shortcuts_backend.h"
26 #include "chrome/browser/history/shortcuts_backend_factory.h" 27 #include "chrome/browser/history/shortcuts_backend_factory.h"
27 #include "chrome/browser/history/url_database.h" 28 #include "chrome/browser/history/url_database.h"
28 #include "chrome/browser/prefs/pref_service.h"
29 #include "chrome/common/pref_names.h" 29 #include "chrome/common/pref_names.h"
30 #include "chrome/test/base/testing_profile.h" 30 #include "chrome/test/base/testing_profile.h"
31 #include "content/public/test/test_browser_thread.h" 31 #include "content/public/test/test_browser_thread.h"
32 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
33 33
34 using content::BrowserThread; 34 using content::BrowserThread;
35 using history::ShortcutsBackend; 35 using history::ShortcutsBackend;
36 36
37 namespace { 37 namespace {
38 38
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 664
665 match.destination_url = GURL(shortcuts_to_test_delete[2].url); 665 match.destination_url = GURL(shortcuts_to_test_delete[2].url);
666 match.contents = ASCIIToUTF16(shortcuts_to_test_delete[2].contents); 666 match.contents = ASCIIToUTF16(shortcuts_to_test_delete[2].contents);
667 match.description = ASCIIToUTF16(shortcuts_to_test_delete[2].description); 667 match.description = ASCIIToUTF16(shortcuts_to_test_delete[2].description);
668 668
669 provider_->DeleteMatch(match); 669 provider_->DeleteMatch(match);
670 EXPECT_EQ(original_shortcuts_count, backend_->shortcuts_map().size()); 670 EXPECT_EQ(original_shortcuts_count, backend_->shortcuts_map().size());
671 EXPECT_TRUE(backend_->shortcuts_map().end() == 671 EXPECT_TRUE(backend_->shortcuts_map().end() ==
672 backend_->shortcuts_map().find(ASCIIToUTF16("delete"))); 672 backend_->shortcuts_map().find(ASCIIToUTF16("delete")));
673 } 673 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/shortcuts_provider.cc ('k') | chrome/browser/autocomplete/zero_suggest_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698