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

Side by Side Diff: chrome/browser/android/dev_tools_server.cc

Issue 109013006: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 12 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 (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/android/dev_tools_server.h" 5 #include "chrome/browser/android/dev_tools_server.h"
6 6
7 #include <pwd.h> 7 #include <pwd.h>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 virtual GURL GetUrl() const OVERRIDE { return url_; } 76 virtual GURL GetUrl() const OVERRIDE { return url_; }
77 77
78 virtual GURL GetFaviconUrl() const OVERRIDE { return favicon_url_; } 78 virtual GURL GetFaviconUrl() const OVERRIDE { return favicon_url_; }
79 79
80 virtual base::TimeTicks GetLastActivityTime() const OVERRIDE { 80 virtual base::TimeTicks GetLastActivityTime() const OVERRIDE {
81 return last_activity_time_; 81 return last_activity_time_;
82 } 82 }
83 83
84 protected: 84 protected:
85 explicit TargetBase(WebContents* web_contents) 85 explicit TargetBase(WebContents* web_contents)
86 : title_(UTF16ToUTF8(web_contents->GetTitle())), 86 : title_(base::UTF16ToUTF8(web_contents->GetTitle())),
87 url_(web_contents->GetURL()), 87 url_(web_contents->GetURL()),
88 favicon_url_(GetFaviconURL(web_contents)), 88 favicon_url_(GetFaviconURL(web_contents)),
89 last_activity_time_(web_contents->GetLastSelectedTime()) { 89 last_activity_time_(web_contents->GetLastSelectedTime()) {
90 } 90 }
91 91
92 TargetBase(const base::string16& title, const GURL& url) 92 TargetBase(const base::string16& title, const GURL& url)
93 : title_(UTF16ToUTF8(title)), 93 : title_(base::UTF16ToUTF8(title)),
94 url_(url) 94 url_(url)
95 {} 95 {}
96 96
97 private: 97 private:
98 const std::string title_; 98 const std::string title_;
99 const GURL url_; 99 const GURL url_;
100 const GURL favicon_url_; 100 const GURL favicon_url_;
101 const base::TimeTicks last_activity_time_; 101 const base::TimeTicks last_activity_time_;
102 }; 102 };
103 103
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 jobject obj, 463 jobject obj,
464 jint server, 464 jint server,
465 jboolean enabled) { 465 jboolean enabled) {
466 DevToolsServer* devtools_server = reinterpret_cast<DevToolsServer*>(server); 466 DevToolsServer* devtools_server = reinterpret_cast<DevToolsServer*>(server);
467 if (enabled) { 467 if (enabled) {
468 devtools_server->Start(); 468 devtools_server->Start();
469 } else { 469 } else {
470 devtools_server->Stop(); 470 devtools_server->Stop();
471 } 471 }
472 } 472 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698