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

Side by Side Diff: chrome/browser/browsing_data/history_counter.cc

Issue 2127403002: Make browsing_data component a layered component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed output_name from components/browsing_data/content/BUILD.gn Created 4 years, 5 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/browsing_data/history_counter.h" 5 #include "chrome/browser/browsing_data/history_counter.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/timer/timer.h" 11 #include "base/timer/timer.h"
12 #include "chrome/browser/history/history_service_factory.h" 12 #include "chrome/browser/history/history_service_factory.h"
13 #include "chrome/browser/history/web_history_service_factory.h" 13 #include "chrome/browser/history/web_history_service_factory.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/sync/profile_sync_service_factory.h" 15 #include "chrome/browser/sync/profile_sync_service_factory.h"
16 #include "components/browser_sync/browser/profile_sync_service.h" 16 #include "components/browser_sync/browser/profile_sync_service.h"
17 #include "components/browsing_data/pref_names.h" 17 #include "components/browsing_data/core/pref_names.h"
18 #include "components/history/core/browser/history_service.h" 18 #include "components/history/core/browser/history_service.h"
19 #include "components/history/core/browser/web_history_service.h" 19 #include "components/history/core/browser/web_history_service.h"
20 #include "content/public/browser/browser_thread.h" 20 #include "content/public/browser/browser_thread.h"
21 21
22 namespace { 22 namespace {
23 static const int64_t kWebHistoryTimeoutSeconds = 10; 23 static const int64_t kWebHistoryTimeoutSeconds = 10;
24 } 24 }
25 25
26 HistoryCounter::HistoryCounter(Profile* profile) 26 HistoryCounter::HistoryCounter(Profile* profile)
27 : BrowsingDataCounter(browsing_data::prefs::kDeleteBrowsingHistory), 27 : BrowsingDataCounter(browsing_data::prefs::kDeleteBrowsingHistory),
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 bool history_sync_enabled_new_state = 183 bool history_sync_enabled_new_state =
184 !!WebHistoryServiceFactory::GetForProfile(profile_); 184 !!WebHistoryServiceFactory::GetForProfile(profile_);
185 185
186 // If the history sync was just enabled or disabled, restart the counter 186 // If the history sync was just enabled or disabled, restart the counter
187 // so that we update the result accordingly. 187 // so that we update the result accordingly.
188 if (history_sync_enabled_ != history_sync_enabled_new_state) { 188 if (history_sync_enabled_ != history_sync_enabled_new_state) {
189 history_sync_enabled_ = history_sync_enabled_new_state; 189 history_sync_enabled_ = history_sync_enabled_new_state;
190 Restart(); 190 Restart();
191 } 191 }
192 } 192 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/history_counter.h ('k') | chrome/browser/browsing_data/history_counter_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698