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

Side by Side Diff: chrome/browser/search/instant_io_context.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/search/instant_io_context.h" 5 #include "chrome/browser/search/instant_io_context.h"
6 6
7 #include "content/public/browser/browser_thread.h" 7 #include "content/public/browser/browser_thread.h"
8 #include "content/public/browser/resource_context.h" 8 #include "content/public/browser/resource_context.h"
9 #include "content/public/browser/resource_request_info.h" 9 #include "content/public/browser/resource_request_info.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 InstantIOContext::~InstantIOContext() { 45 InstantIOContext::~InstantIOContext() {
46 } 46 }
47 47
48 // static 48 // static
49 void InstantIOContext::SetUserDataOnIO( 49 void InstantIOContext::SetUserDataOnIO(
50 content::ResourceContext* resource_context, 50 content::ResourceContext* resource_context,
51 scoped_refptr<InstantIOContext> instant_io_context) { 51 scoped_refptr<InstantIOContext> instant_io_context) {
52 resource_context->SetUserData( 52 resource_context->SetUserData(
53 InstantIOContext::kInstantIOContextKeyName, 53 InstantIOContext::kInstantIOContextKeyName,
54 new base::UserDataAdapter<InstantIOContext>(instant_io_context)); 54 new base::UserDataAdapter<InstantIOContext>(instant_io_context.get()));
55 } 55 }
56 56
57 // static 57 // static
58 void InstantIOContext::AddInstantProcessOnIO( 58 void InstantIOContext::AddInstantProcessOnIO(
59 scoped_refptr<InstantIOContext> instant_io_context, 59 scoped_refptr<InstantIOContext> instant_io_context,
60 int process_id) { 60 int process_id) {
61 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 61 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
62 instant_io_context->process_ids_.insert(process_id); 62 instant_io_context->process_ids_.insert(process_id);
63 } 63 }
64 64
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 InstantMostVisitedItem item; 130 InstantMostVisitedItem item;
131 if (most_visited_item_cache_.GetItemWithRestrictedID(most_visited_item_id, 131 if (most_visited_item_cache_.GetItemWithRestrictedID(most_visited_item_id,
132 &item)) { 132 &item)) {
133 *url = item.url; 133 *url = item.url;
134 return true; 134 return true;
135 } 135 }
136 136
137 *url = GURL(); 137 *url = GURL();
138 return false; 138 return false;
139 } 139 }
OLDNEW
« no previous file with comments | « chrome/browser/search/iframe_source_unittest.cc ('k') | chrome/browser/search/instant_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698