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

Side by Side Diff: chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc

Issue 671783002: Reverting instrumentations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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) 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/extensions/api/bookmark_manager_private/bookmark_manage r_private_api.h" 5 #include "chrome/browser/extensions/api/bookmark_manager_private/bookmark_manage r_private_api.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
11 #include "base/prefs/pref_service.h" 11 #include "base/prefs/pref_service.h"
12 #include "base/profiler/scoped_profile.h"
13 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
15 #include "base/values.h" 14 #include "base/values.h"
16 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 15 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
17 #include "chrome/browser/bookmarks/bookmark_stats.h" 16 #include "chrome/browser/bookmarks/bookmark_stats.h"
18 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" 17 #include "chrome/browser/bookmarks/chrome_bookmark_client.h"
19 #include "chrome/browser/enhanced_bookmarks/enhanced_bookmark_model_factory.h" 18 #include "chrome/browser/enhanced_bookmarks/enhanced_bookmark_model_factory.h"
20 #include "chrome/browser/extensions/api/bookmarks/bookmark_api_constants.h" 19 #include "chrome/browser/extensions/api/bookmarks/bookmark_api_constants.h"
21 #include "chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.h" 20 #include "chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.h"
22 #include "chrome/browser/extensions/extension_web_ui.h" 21 #include "chrome/browser/extensions/extension_web_ui.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 LAZY_INSTANCE_INITIALIZER; 264 LAZY_INSTANCE_INITIALIZER;
266 265
267 // static 266 // static
268 BrowserContextKeyedAPIFactory<BookmarkManagerPrivateAPI>* 267 BrowserContextKeyedAPIFactory<BookmarkManagerPrivateAPI>*
269 BookmarkManagerPrivateAPI::GetFactoryInstance() { 268 BookmarkManagerPrivateAPI::GetFactoryInstance() {
270 return g_factory.Pointer(); 269 return g_factory.Pointer();
271 } 270 }
272 271
273 void BookmarkManagerPrivateAPI::OnListenerAdded( 272 void BookmarkManagerPrivateAPI::OnListenerAdded(
274 const EventListenerInfo& details) { 273 const EventListenerInfo& details) {
275 // TODO(vadimt): Remove ScopedProfile below once crbug.com/417106 is fixed.
276 tracked_objects::ScopedProfile tracking_profile(
277 FROM_HERE_WITH_EXPLICIT_FUNCTION(
278 "BookmarkManagerPrivateAPI::OnListenerAdded"));
279
280 EventRouter::Get(browser_context_)->UnregisterObserver(this); 274 EventRouter::Get(browser_context_)->UnregisterObserver(this);
281 event_router_.reset(new BookmarkManagerPrivateEventRouter( 275 event_router_.reset(new BookmarkManagerPrivateEventRouter(
282 browser_context_, 276 browser_context_,
283 BookmarkModelFactory::GetForProfile( 277 BookmarkModelFactory::GetForProfile(
284 Profile::FromBrowserContext(browser_context_)))); 278 Profile::FromBrowserContext(browser_context_))));
285 } 279 }
286 280
287 BookmarkManagerPrivateDragEventRouter::BookmarkManagerPrivateDragEventRouter( 281 BookmarkManagerPrivateDragEventRouter::BookmarkManagerPrivateDragEventRouter(
288 Profile* profile, 282 Profile* profile,
289 content::WebContents* web_contents) 283 content::WebContents* web_contents)
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 833
840 enhanced_bookmarks::EnhancedBookmarkModel* model = 834 enhanced_bookmarks::EnhancedBookmarkModel* model =
841 enhanced_bookmarks::EnhancedBookmarkModelFactory::GetForBrowserContext( 835 enhanced_bookmarks::EnhancedBookmarkModelFactory::GetForBrowserContext(
842 browser_context()); 836 browser_context());
843 model->SetVersionSuffix(params->version); 837 model->SetVersionSuffix(params->version);
844 838
845 return true; 839 return true;
846 } 840 }
847 841
848 } // namespace extensions 842 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/input_method_api.cc ('k') | chrome/browser/extensions/api/bookmarks/bookmarks_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698