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

Side by Side Diff: chrome/browser/ui/search/search_ipc_router.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 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/ui/search/search_ipc_router.h" 5 #include "chrome/browser/ui/search/search_ipc_router.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/search/search.h" 10 #include "chrome/browser/search/search.h"
(...skipping 15 matching lines...) Expand all
26 if (!base::IsAsciiAlpha(*it) && !base::IsAsciiDigit(*it)) 26 if (!base::IsAsciiAlpha(*it) && !base::IsAsciiDigit(*it))
27 return false; 27 return false;
28 } 28 }
29 return true; 29 return true;
30 } 30 }
31 31
32 } // namespace 32 } // namespace
33 33
34 SearchIPCRouter::SearchIPCRouter(content::WebContents* web_contents, 34 SearchIPCRouter::SearchIPCRouter(content::WebContents* web_contents,
35 Delegate* delegate, 35 Delegate* delegate,
36 scoped_ptr<Policy> policy) 36 std::unique_ptr<Policy> policy)
37 : WebContentsObserver(web_contents), 37 : WebContentsObserver(web_contents),
38 delegate_(delegate), 38 delegate_(delegate),
39 policy_(std::move(policy)), 39 policy_(std::move(policy)),
40 commit_counter_(0), 40 commit_counter_(0),
41 is_active_tab_(false) { 41 is_active_tab_(false) {
42 DCHECK(web_contents); 42 DCHECK(web_contents);
43 DCHECK(delegate); 43 DCHECK(delegate);
44 DCHECK(policy_.get()); 44 DCHECK(policy_.get());
45 } 45 }
46 46
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 return; 329 return;
330 330
331 delegate_->OnHistorySyncCheck(); 331 delegate_->OnHistorySyncCheck();
332 } 332 }
333 333
334 void SearchIPCRouter::set_delegate_for_testing(Delegate* delegate) { 334 void SearchIPCRouter::set_delegate_for_testing(Delegate* delegate) {
335 DCHECK(delegate); 335 DCHECK(delegate);
336 delegate_ = delegate; 336 delegate_ = delegate;
337 } 337 }
338 338
339 void SearchIPCRouter::set_policy_for_testing(scoped_ptr<Policy> policy) { 339 void SearchIPCRouter::set_policy_for_testing(std::unique_ptr<Policy> policy) {
340 DCHECK(policy.get()); 340 DCHECK(policy.get());
341 policy_.reset(policy.release()); 341 policy_.reset(policy.release());
342 } 342 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_ipc_router.h ('k') | chrome/browser/ui/search/search_ipc_router_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698