Skip to content

Commit

Permalink
Move shortcuts_database.{cc,h} to //chrome/browser/autocomplete
Browse files Browse the repository at this point in the history
The sole client of ShortcutsDatabase is ShortcutsBackend and the
implementation of ShortcutsDatabase does not depends on //c/b/history
so it makes more sense to put this code in //c/b/autocomplete.

All files were moved using tools/git/move_source_files.py and then the
build system files (gyp and gn) were manually editted.

BUG=370850, 371538

Review URL: https://codereview.chromium.org/830503003

Cr-Commit-Position: refs/heads/master@{#309920}
  • Loading branch information
sdefresne authored and Commit bot committed Jan 5, 2015
1 parent 40db596 commit a3b9602
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion chrome/browser/autocomplete/shortcuts_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
#include "base/guid.h"
#include "base/i18n/case_conversion.h"
#include "base/strings/string_util.h"
#include "chrome/browser/autocomplete/shortcuts_database.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/shortcuts_database.h"
#include "chrome/browser/omnibox/omnibox_log.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/autocomplete/shortcuts_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "base/strings/string16.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
#include "chrome/browser/history/shortcuts_database.h"
#include "chrome/browser/autocomplete/shortcuts_database.h"
#include "components/keyed_service/core/refcounted_keyed_service.h"
#include "components/omnibox/autocomplete_match.h"
#include "content/public/browser/notification_observer.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/autocomplete/shortcuts_backend_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
#include "chrome/browser/history/shortcuts_database.h"
#include "chrome/browser/autocomplete/shortcuts_database.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/ui_test_utils.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/history/shortcuts_database.h"
#include "chrome/browser/autocomplete/shortcuts_database.h"

#include <string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_HISTORY_SHORTCUTS_DATABASE_H_
#define CHROME_BROWSER_HISTORY_SHORTCUTS_DATABASE_H_
#ifndef CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_DATABASE_H_
#define CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_DATABASE_H_

#include <map>
#include <string>
Expand Down Expand Up @@ -136,4 +136,4 @@ class ShortcutsDatabase : public base::RefCountedThreadSafe<ShortcutsDatabase> {

} // namespace history

#endif // CHROME_BROWSER_HISTORY_SHORTCUTS_DATABASE_H_
#endif // CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_DATABASE_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/autocomplete/shortcuts_database.h"

#include "base/files/scoped_temp_dir.h"
#include "base/format_macros.h"
#include "base/path_service.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "chrome/browser/history/shortcuts_database.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/testing_profile.h"
Expand Down
4 changes: 2 additions & 2 deletions chrome/chrome_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,8 @@
'browser/autocomplete/shortcuts_backend.h',
'browser/autocomplete/shortcuts_backend_factory.cc',
'browser/autocomplete/shortcuts_backend_factory.h',
'browser/autocomplete/shortcuts_database.cc',
'browser/autocomplete/shortcuts_database.h',
'browser/autocomplete/shortcuts_provider.cc',
'browser/autocomplete/shortcuts_provider.h',
'browser/autocomplete/zero_suggest_provider.cc',
Expand Down Expand Up @@ -1532,8 +1534,6 @@
'browser/history/in_memory_url_index.h',
'browser/history/scored_history_match.cc',
'browser/history/scored_history_match.h',
'browser/history/shortcuts_database.cc',
'browser/history/shortcuts_database.h',
'browser/history/top_sites.cc',
'browser/history/top_sites.h',
'browser/history/top_sites_backend.cc',
Expand Down
2 changes: 1 addition & 1 deletion chrome/chrome_tests_unit.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
'browser/autocomplete/keyword_extensions_delegate_impl_unittest.cc',
'browser/autocomplete/search_provider_unittest.cc',
'browser/autocomplete/shortcuts_backend_unittest.cc',
'browser/autocomplete/shortcuts_database_unittest.cc',
'browser/autocomplete/shortcuts_provider_unittest.cc',
'browser/autocomplete/zero_suggest_provider_unittest.cc',
'browser/autofill/autofill_cc_infobar_delegate_unittest.cc',
Expand Down Expand Up @@ -469,7 +470,6 @@
'browser/history/in_memory_url_index_unittest.cc',
'browser/history/scored_history_match_unittest.cc',
'browser/history/select_favicon_frames_unittest.cc',
'browser/history/shortcuts_database_unittest.cc',
'browser/history/thumbnail_database_unittest.cc',
'browser/history/top_sites_database_unittest.cc',
'browser/history/top_sites_impl_unittest.cc',
Expand Down

0 comments on commit a3b9602

Please sign in to comment.